Hi,
Well, it does not matter if you also set the custom date formatting to header cell, your header text would look fine. Anyways, see the sample code below:
//…
//Define a style object adding a new style
//to the collection list.
Style stl5 = workbook.Styles[workbook.Styles.Add()];
//Set custom number format.
stl5.Custom = “dd/mm/yyyy”;
StyleFlag flag = new StyleFlag();
flag.NumberFormat = true;
//Create a named range of cells (B2:B100)in the first worksheet.
Range range = workbook.Worksheets[0].Cells.CreateRange(“B2”, “B100”);
//Apply the style to cells in the named range.
range.ApplyStyle(stl5, flag);
Thank you.