LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Excel Cell Color

I am comparing an excel workbook with many sheets to other workbooks with one sheet. Each single sheet workbook is exactly the same as a sheet on the workbook with multiple sheets. So I open up the multi sheet workbook and write the values from a certain sheet into an array, then i open up the corresponding workbook and write these values into a diferent array and compare them. This works great, but what i would like to do is that if two of the cell values are not equal i would like to change the color of those cells on both worksheets. When there are two values that are not equal i pop up a message to the user. I do have an index for which value is not equal, but i am not sure how to use the index value to find the right cell in excel. Hope this wasn't too confusing. Any help is greatly appreciated

Mike
0 Kudos
Message 1 of 2
(3,882 Views)
Hello Mike,

Changing the colors of cells in Excel is very simple if you know an index (row and column) of the cell you want to change. The property nodes when working with Excel use the Excel format of letters and numbers to specify which cell you want to change. Since in your LabVIEW program you are probably not using this format as your index you must make a conversion from the index to the Excel format.
I am attaching a vi that changed the colors of a block of rows and columns using an index. You can also double-click the subvi "Row Col to Range Format.vi" to see how you convert each index to a letter and column to input into Excel.

Thanks,
Caroline
National Instruments
Thanks,
Caroline Tipton
Data Management Product Manager
National Instruments
Message 2 of 2
(3,825 Views)