LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chart Problem Excel.Series in Labvew 6i

I am stuck again with a chart problem.
 
I want to name the series in the chart from another location in Excel sheet. From recording and looking at the macro i know I will need a function
 
ActiveChart.SeriesCollection(n).Name where n is the index. Please see the attached file.
The output from the invoke node in LV 6i is a variant and I will need to type cast it using "Variant to Data" to get a refnum for the series so that I can call the method Series.Name.
 
I somehow need to find a way to type cast to Excel.Series and proceed from there. Any thoughts?
0 Kudos
Message 1 of 3
(2,856 Views)
Hi!

You have to use the "Variant To Data.vi" and type cast the Variant "SeriesCollection" to a reference "SeriesCollection" (see attachement)

The Control "Excel.SeriesCollection Reference" can be founden on the Front Panel as "Automation RefNum". With Right Click of the mouse, you can choose the ActiveX Class. There you have to scroll until you found the Microsoft Excel Library and search the SeriesCollection Object. Uncheck the "Show Creatable Object Only" Checkbox.

Regards
Ken
0 Kudos
Message 2 of 3
(2,851 Views)
Thanks a lot for the response. I didnt realize about the checkbox for creatable objects only.
0 Kudos
Message 3 of 3
(2,837 Views)