LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX and Excel Types

Solved!
Go to solution

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.

0 Kudos
Message 1 of 4
(2,363 Views)

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: xlValuexlCategory, 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.

 

 

Message 2 of 4
(2,340 Views)
Solution
Accepted by topic author _natalie_

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.

Message 3 of 4
(2,324 Views)

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.

 

0 Kudos
Message 4 of 4
(2,290 Views)