LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set excel cell color and border independently

Solved!
Go to solution

I am working with the Excel set color and border vi and I run into a problem when I try to set cell colors of some cells and borders of others. For example I want to set the border of some cells then I want the top section of that border to be a certain color. If I set just the borders by itself it works as expected. If I set just the colors by itself it works as expected. The problem I am running into is it seems that when I set the border then when I try to set the cell color, it overwrites part of the border.

 

 

Is there a way around this or another way to do this?

 

 

Thanks

 

 

Color-and-Border-test.png

 

 

Below is the output with border only - color only - and both enabled

border only.pngcolor only.pngboth.png

0 Kudos
Message 1 of 3
(2,766 Views)
Solution
Accepted by topic author DP2018

Close, but no cigar.  Try doing both at the same time.  Note that an unwired terminal means "Color this the default way".  If you want both Fill and Border, then set both Fill and Border once.  When you enable both Cases, you first set Borders (with default Fill), then set Fill (with default Borders).

 

Bob Schor

Message 2 of 3
(2,753 Views)

That worked. Instead of setting all borders and then setting all colors, I figured out which cells needed both borders and colors then put those coordinates into the first for loop, then added borders only for the cells that had no colors in the second.

 

Thanks for the help!

0 Kudos
Message 3 of 3
(2,712 Views)