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,708 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,703 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,687 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,675 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,667 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,664 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,655 Views)