ni.com is currently experiencing issues.

Support teams are actively working on the resolution.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use a cell name to find the cell location with the Report Generation Toolkit

Hello all,

 

 

 

I hope you can help me. I want to find the correct cell location e.g. B2 if I use the cell name as a input e.g. "FindMe" 

I think this must be easy I cant find the correct way to do this however. I am using the Report Generation Toolkit.

 

thanx for the help!

 

123_Its_Me_0-1705595503196.png

 

0 Kudos
Message 1 of 6
(666 Views)

This is possible, but requires using Excel Get ActiveX References.vi:

 

Darren_0-1705597373867.png

 

0 Kudos
Message 2 of 6
(655 Views)

If you want to write text to that location, use the "MS Office Parameters" cluster and the "name" string control. 

 

aputman_0-1705598967634.png

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 6
(646 Views)

Hey Darren, thank you!

I cant select the "Range" option in the property node, I can only select "UsedRange" . Do you have got any idea what could be wrong ? I did also search for Cell1 it is also not there I can find "Cells

 

 

123_Its_Me_0-1705651545479.png

 

 

 

 

 

 

 

 

0 Kudos
Message 4 of 6
(591 Views)

Hello Darren, I did not look good enough at your example. I did use a property node but the first one needs to be an invoke node.

 

123_Its_Me_0-1705653743166.png

 

Now it works! thanx!

 

A related question would be, what can I search for (on www) if I want to understand the Methods provided and returned properties better? for instance a lot of data is returned as a variant. Without knowing the type it is hard to extract the correct data. 

 

I did also take a look at other functions to get a better understanding of the code already written. I was wondering what this part does hope you can explain it:

 

123_Its_Me_1-1705654081778.png

Does it take a part of the report-in class ? Or is it used to check if the correct class is used?

 

Thanx !

 

 

 

 

 

 

 

 

 

 

 

 

0 Kudos
Message 5 of 6
(579 Views)

For your first question as to how to learn more about the ActiveX interface to Excel, there are two good resources:

 

1. Digging through the Report Generation Toolkit Excel subVIs.

2. The Microsoft website: Excel Visual Basic for Applications (VBA) reference | Microsoft Learn

 

For your second question, yes, I believe the code is making sure that the Report class that is wired in is an Excel child class. If so, it can perform the operation. If not (i.e. if it's an HTML or Word report), it returns an error.

0 Kudos
Message 6 of 6
(559 Views)