LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help modifying Excel Macro Example.vi

I have a working VI using Excel Macro Example.vi to create a chart in Excel from the data in my VI. My problem is that I need to create a header from data entered on the front panel of the VI. I cant see how to modify the example VI to read in a header.
0 Kudos
Message 1 of 6
(3,090 Views)
Hi,
if you need to insert a header on data column you can use the property Range as shown in the vi. See example modified: a header is added to the columns at row 1.
Note that for a correct graph visualization you should modify the macro script to set the new data range.
Hope it helps,
Alberto
0 Kudos
Message 2 of 6
(3,090 Views)
Thanks, but how do I put header into the chart rather than the data?
Also, would you mind saving your files for LV 6.0, as I cant open the file you sent me.

Thanks again
0 Kudos
Message 3 of 6
(3,090 Views)
You can implement the header directly into the macro very easily. Just pass the string Title to the macro as ARG1. Then change the following two lines in the macro:

Old: Sub GraphData( )
New: Sub GraphData(NewTitle As String)

Old: .ChartTitle.Characters.Text = "Data"
New: .ChartTitle.Characters.Text = NewTitle

Save the changes in your project.xls file and you are good to go.

Michael
www.abcdefirm.com
Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.1, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 4 of 6
(3,090 Views)
Hi again,
here is the example in LV6.
To place the header on the chart follow Michael's answer.
Alberto
0 Kudos
Message 5 of 6
(3,090 Views)
Thanks, that works great!
0 Kudos
Message 6 of 6
(3,090 Views)