Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

New Post: Background fill for empty cells within the table

$
0
0
It's doing exactly what you're telling it to do: from the workbook give me the worksheet, then the columns used (have values), of those give me the cells that are being used (have values) then set the background color.

There are many ways to accomplish it but I'd probably do:

worksheet.RangeUsed().Style.Fill.BackgroundColor = XLColor.FromArgb(1);

You can also do:

cell.Style...
range.Style...
table.Style...
worksheet.Style...
row.Style...
column.Style...

Viewing all articles
Browse latest Browse all 1877

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>