LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

difficulties when calling excel ActiveX

I use the diagram below to set the range "A1" background color to be Green.

微信截图_20190516083618.png

As you can see ,the first two blocks I use the report builder blocks which were built in LabVIEW, it works well.

 

but sometimes , I need to call other applications ,not so simple as Excel  , and I need to build the reference all by myself, such as below:

2.png

and then ,as a practise, I tried calling Excel by the second method , but ,when choosing the ActiveX class, I was strongly puzzled ,there are so many ActiveX classes and I don't which one to choose , from which one to begin.  I can disgunish them only from their names , no more instructions.

3.png

 

what shall I do ?

any suggestion will be appreciated~~

0 Kudos
Message 1 of 4
(1,920 Views)

Better look for Microsoft Excel.... (care about version number)

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(1,890 Views)

This works for me.

 

activex_excel.png

0 Kudos
Message 3 of 4
(1,883 Views)

Just as an aside, I don't know if you're aware but you can operate on a Range object without having to activate the Worksheet that contains it.  Also, you don't need to convert the Sheets index to a variant: the Item method will accept an integer.

 

Little things, I know, but I always like to tidy code wherever I can!

0 Kudos
Message 4 of 4
(1,875 Views)