From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

show excel rows dynamically

I have an application which is almost complete.  The only issue left to deal with is more of an asthetic one than anything.  Currently, I am using ActiveX to open an excel object on the front panel and populate it with the contents of a previously generated template.  Then I add the contents of two arrays (elements selected from two periodic tables) and I input some additional numeric values.  Here's the issue.  Currently, I have 30 rows in the template; therefore there are 30 rows by default dispplayed on my front panel.  I know that a more elegant solution would be to display only as many rows as there are elements selected.  So I can get the array size and then I want to display only that number of rows in the excel spreadsheet.  I have done this with arrays (with the help of an open G vi) but I don;t know how to do it with this.
0 Kudos
Message 1 of 4
(2,455 Views)

Hi,

 

Can you please post a screenshot of your VI or your VI itself. That would help a lot in terms of answering your question. Thanks!

 

Ipshita C.

National Instruments
Applications Engineer
0 Kudos
Message 2 of 4
(2,431 Views)
Sorry for not having posted code or screeen shots originally.  It's quite a complex app with a lot of sub VIs.  The good news is, I solved it!  I got the array size, added that value to an offset to allow for headers, converted the number to a decimal string, concatenated that with a string constant representing the column letter, and passed that value to a Worksheet Range Invoke node as the cell 2 value.  Sounds ugly, but it's fairly elegant and very robust.
0 Kudos
Message 3 of 4
(2,425 Views)

Glad to hear that!

 

Ipshita C.

National Instruments
Applications Engineer
0 Kudos
Message 4 of 4
(2,410 Views)