11-11-2020 03:48 PM
Hello,
I am trying to use LabVIEW to create a report in Excel with ActiveX commands.
I'd like to edit the axis limits. I used "invoke node" to get a Chart reference for the Axes variant. I'd like to convert that variant into a reference, but I can not find the "Excel.Axis" type. I'm new to using the ActiveX commands, so please correct me if I am not using the right lingo.
I am able to find and use other types like "Excel.SeriesCollection" or "Excel.Worksheet". If I right click one of those references and press "Select ActiveX Class", I can not find "Excel.Axis". If I click browse, I am unable to find any of the Excel types. Where do I go to add/find this type for Excel?
I am using LabVIEW 2016 and Excel 2016.
Solved! Go to Solution.
11-11-2020 05:31 PM
This is probably the function you used to get the Axes. If you look there you can see the Variant input is described as follows:
Specifies the axis to return. Can be one of the following XlAxisType constants: xlValue, xlCategory, or xlSeriesAxis (xlSeriesAxis is valid only for 3D charts).
Following the link to XlAxisType lets you know that it's basically an enum with 3 possible values. So you can probably just wire up an integer to it with whichever of those 3 values is appropriate.
11-11-2020 06:56 PM
Open the Browse window, then drop down the "Type Library" field, then scroll down to "Microsoft Excel 16.0 Object Library"
BertMcMahan_0-1605142451526.png
BertMcMahan_1-1605142494970.png
It should be in the list below.
In case you can't find it, I made it and saved it as a VI. I had to backsave from 2020 to 2016 so it might not work right but I figured it's worth a shot.
11-12-2020 12:14 PM
Thank you very much for showing me this! I was looking for _Axis, not Axis. Now I know where to find other options.
Thanks again.