ExcelMapper
ExcelMapper copied to clipboard
set header background color using code
Hi. Is it possible to create styles for header using code when creating a file?
I found a solution using the event to set the AutoSizeColumns, but with the colors it doesn't work anymore, because the Save function overwrites them.
The invocation of the Saving event happens right before the workbook is written so I'm surprised the style gets overwritten:
https://github.com/mganss/ExcelMapper/blob/efc3efdf2de04a4776c58f17fa21b8009074645c/ExcelMapper/ExcelMapper.cs#L1012-L1014
Have you already investigated where the overwriting occurs?