LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create Excel macro from LabVIEW

I got a code that create new excel file and dump data into that file. Now I want to create a macro in that excel file by using LabVIEW. Do you have an example code that LabVIEW creates a new excel macro?
0 Kudos
Message 1 of 2
(3,098 Views)
There is a good example that ships with LV 7.1 called Run Macro On Word Table.vi. You just need to use the excel vi's under the Report Generation Toolkit. If you don't have 7.1 and have at least version 6.1, you need Excel Import Module, Excel Run Macro, and Excel Remove Module vi. The easiest way to generate you macro code for the Excel Import Module is to open excel and record the macro. Then go and edit the macro in excel, copy the the code to the clipboard, and paste the code in a text box in LV and connect it to the module code pin. See the attached screenshot for further explantion.
Message 2 of 2
(3,098 Views)