ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX Topic: Controlling/Formatting Excel File Cell Parameters from LabVIEW VI.

Hello!

 

I would like to control/format Excel cell parameters, such as location, column width & cell color, for each data string being generated (i.e., For Loop) from a LabVIEW VI and being dumped into a spreadsheet. I used a bit of the code from the ActiveX built-in example “Write Tabel to Excel” VI, but in my situation the Excel file is already “open” (via the “Open/Create/Replace File” VI) and I would simply like to ADD data to this file controlling its cell properties for each chunk of data flowing into the file.

 

Also, is there a way to display the status of the REFNUMs (whether be via front panel or Operating System file type)?

 

Thank you in advance for your time!

0 Kudos
Message 1 of 7
(4,807 Views)

Try the attached. It could be modified, of course, to work on other methods/properties. The RowColToChange.vi is just a tidying-up of that provided by NI in examples. The FormatRowBorder.vi works from an Excel spreadsheet that is already open.

Sorry, I can't answer your second question.

Download All
0 Kudos
Message 2 of 7
(4,802 Views)

JohnBoy,

Thanks for your reply. Unfortunately, I have at my disposition version 6i. I could not convert from version 7.0. If it's a simple task to convert from your end it would be much appreciated....Thank you!

0 Kudos
Message 3 of 7
(4,786 Views)
I went ahead and converted them to LabVIEW 6.1.

Trey B | Applications Engineering | National Instruments
Download All
0 Kudos
Message 4 of 7
(4,774 Views)

Trey B,

The version I have is 6i...I believe it's one version back of 6.1. It's not compatible. I will have to download the evaluation software of 8.5 to view the code. Thanks for your effort!

0 Kudos
Message 5 of 7
(4,766 Views)
Oh, right.  6i is what we called 6.0.  The naming conventions back then were a bit different.  Try these.

Trey B | Applications Engineering | National Instruments
Download All
0 Kudos
Message 6 of 7
(4,763 Views)
Thanks Trey B...the conversion worked. It also literally invoked the "Excel._Worksheet" refnum into my ActiveX Class which I did not have access to before? (When I right click on this refnum on the front panel and choose the "Select ActiveX Class", the "Excel._Worksheet" now appears which it did not before). I'm still a little green with ActiveX components since I'm not quite sure how to correlate this refnum icon to the spreadsheet which was opened with the "Open/ Create/ Replace File" VI?
0 Kudos
Message 7 of 7
(4,754 Views)