LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

EXCEL MACRO

I am new to Labview and trying to run an excel macro from this vi. all the examples i see are using a reference to excel and i dont have that right now. can someone point me in the right direction on either how to do it or how i can get a reference to excel.

Thanks for your help
Mike
0 Kudos
Message 1 of 5
(3,440 Views)
Maybe I misunderstood your post, but is you don't have Excel, you won't be able to use any Excel macros....

If it's the reference to excel you require, pop an ActiveX "automation refnum" on the front panel and right-click it. Choose the class as "Excel object library" (version 10 is currect AFAIK) and then in the box below choose "Excel.Application" and voila, you have a reference.

You'll still need to use the ActiveX "Open" function to make it useable though. And don't forget to close it again when you're finished.

Hope this helps

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 2 of 5
(3,436 Views)
i DO HAVE EXCEL AND I TRIED YOUR RECOMMENDATION, BUT THE MACRO STILL WONT RUN. I HAVE ATTACHED WHAT I HAVE.
tHANKS FOR YOUR QUICK REPLY

MIKE
0 Kudos
Message 3 of 5
(3,425 Views)
It is not going to work. The regular reporting tools from labview can not create excel files. You need the report generation toolkit. The macro is not going to work with any files with extension .xls, the file must be in xls format.

-Joe
Message 4 of 5
(3,412 Views)
You can also try using the GOOP (G Object Oriented Programming) Excel Toolkit.
http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=B45EACE3EF0056A4E034080020E74861

It has examples to get you started, although it will take a little bit of work to fully understand what is going on. The advantage over the Report Generation Toolkit is that it's a free download instead of a toolkit you need to pay for. Of course if you plan on working extensively with Excel and creating a large number of reports, than the more powerful Report Generation Toolkit is worth your while.
Message 5 of 5
(3,400 Views)