2
Here the code, would you have any way to reduce it? (Just for learning reasons)
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 doesn’t work :/
You’re using this nuget package:
https://www.nuget.org/packages/ClosedXML/
– novic