I'm trying to create a table in excel with closedxml and i want it to be having names it's columns with spaces as in thhis picture Table with spaces in its column's names. in the default case the names should not have spaces, i tried rewrite these names after creating the table but the names become transparent even if i mmake sure that the core is black.
the script of creating the table is :
public static void CreateTable(IXLWorksheet ws, int beginRow, int beginColumn, List<SitesTableModel> list)
{
ws.Cell(beginRow, beginColumn).InsertTable(list.AsEnumerable());
var range5 = ws.Range(beginRow, beginColumn, beginRow+list.Count, beginColumn+5);
range5.Style.Alignment.Vertical = XLAlignmentVerticalValues.Top;
range5.Style.Font.FontColor = XLColor.TealBlue;
range5.Style.Font.FontName = "Arial";
range5.Style.Font.FontSize = 10;
range5.Style.Alignment.WrapText = true;
Cell cell = new Cell
{
fontColor = XLColor.Black,
textValue = "Nom du site",
fontName = "Arial",
bold = false,
fontSize = 10,
alignment = XLAlignmentHorizontalValues.Left,
};
SetCellValue(ws, beginRow, beginColumn, cell);
cell.textValue = "Adresse d'audit";
SetCellValue(ws, beginRow, beginColumn+1, cell);
cell.textValue = "Certifications demandées";
SetCellValue(ws, beginRow, beginColumn+2, cell);
cell.textValue = "Activités du site";
SetCellValue(ws, beginRow, beginColumn+3, cell);
cell.textValue = "Produits du site";
SetCellValue(ws, beginRow, beginColumn+4, cell);
}