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

Created Unassigned: Unable to change font color when using DataTable [9401]

$
0
0
The following code does not work correctly. It does change the background color to white, however the text color doesn't change to black making the header row appear blank.

```
var wb = new XLWorkbook();
wb.Style.Fill.BackgroundColor = XLColor.White;
wb.Style.Font.FontColor = XLColor.Black;
// Add a DataTable as a worksheet
wb.Worksheets.Add(dataTable);
foreach (var worksheet in wb.Worksheets)
{
foreach (var table in worksheet.Tables)
{
table.ShowAutoFilter = false;
}
}
wb.SaveAs(excelFileName);
```

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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