LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I set the font (color) of an individual cell in an Excel spreadsheet?

 
0 Kudos
Message 1 of 11
(6,040 Views)
Can using ActiveX
Message 2 of 11
(6,028 Views)
Always use the Excel "Record New Macro" as your guide to writing Active-X code in LabVIEW.
1.  In Excel, start the macro recorder (Tools/Macro/Record new macro).
2.  Do all the actions to achieve what you want.
3.  When all is done, from the Tools/Macro, stop the recorder.
4.  Go to Tools/Macro/Macros, select the macro you just recorded, and click Edit.
5.  There are all the steps in VBA code that you need to translate into LabVIEW.
 
Hope this helps.
Message 4 of 11
(6,007 Views)

I've done a fair amount of controlling Excel via LabVIEW (reading / writing data, adding sheets, using passwords).  But it's all been done with invoke nodes & property nodes (ActiveX ?).

I performed the macro steps you suggested - can you point me in the right direction for translating VBA code into LabVIEW?

Thanks!!

 

0 Kudos
Message 5 of 11
(5,973 Views)
It seems to me you're nearly there.  Each of the macro steps will translate into an equivalent LabVIEW step, using either a Property Node or an Invoke Node, as appropriate.
0 Kudos
Message 6 of 11
(5,969 Views)
I attached a vi I use for writing to a cell.  It's similar to your column width example.  But I can't see how to set the text color of a cell this way.
0 Kudos
Message 7 of 11
(5,962 Views)
I've attached a sample. This vi needs more work, to tidy up and close all references. Unfortunately, I'm short of time!
Message 8 of 11
(5,959 Views)

Wow - you're the man!

This is the 1st time I post a question  - I really appreciate the help.  Thanks!

0 Kudos
Message 9 of 11
(5,956 Views)
For more information and some sample VI's and tool kits, you can go to the excel board



Joe.
"NOTHING IS EVER EASY"
Message 10 of 11
(5,946 Views)