1. How to format the font to BOLD. In the cold below, I used f.FontId = 1, but it didn't work.
2. How to add color to the font?
3. How to set the column width with auto max?
4. With f.NumberFormatId = 4, the output is #,##0.00 which is correct. But how can I get 4 decimals, like #,##0.0000?
var excelStyleSheet = new ExcelStylesheet(); excelStyleSheet.AddCellFormat("Numeric", (f) => { f.NumberFormatId = 4; // #,##0.00 f.Alignment = new Alignment() { Horizontal = HorizontalAlignmentValues.Right, Vertical = VerticalAlignmentValues.Center }; f.ApplyNumberFormat = BooleanValue.FromBoolean(true); }); excelStyleSheet.AddCellFormat("Header", (f) => { f.FontId = 1; f.Alignment = new Alignment() { Horizontal = HorizontalAlignmentValues.Center, Vertical = VerticalAlignmentValues.Center }; f.ApplyFont = BooleanValue.FromBoolean(true); });