Here the code, would you have any way to reduce it? (For learning purposes only)
worksheet.Row(1).Style.Font.FontColor = ClosedXML.Excel.XLColor.White;
worksheet.Row(1).Style.Font.Bold = true;
worksheet.Row(1).Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center);
worksheet.Row(1).Style.Alignment.SetVertical(XLAlignmentVerticalValues.Center);
worksheet.Row(1).Height = 32;
I thought of something like ...
worksheet.Row(1)(.Style.Font.FontColor = ClosedXML.Excel.XLColor.White).Style.Font.Bold = true;
But it does not work: /