Creating excel sheet using ClosedXML

  • Thread starter Thread starter Santosh Umarani
  • Start date Start date
S

Santosh Umarani

Guest
Hi All,

I am using below code to create excel sheet and fill the data from data table. But the excel sheet first row (not header) is different colour and rest of the rows colour is no colour.

using (XLWorkbook xlWorkbook = new XLWorkbook())
{
xlWorkbook.Worksheets.Add(dataTable, "RQ_List");
xlWorkbook.Style.Fill.BackgroundColor = XLColor.NoColor;
MemoryStream memoryStream = GetStream(xlWorkbook);
Stream file = File.Create(fileName);
memoryStream.WriteTo(file);
memoryStream.Close();

file.Close();
}

I am using ClosedXML to create excel. Can anyone let me know how to create excel sheet with uniform colour?

Kindly waiting for your response.

Thanks,

Santosh

Continue reading...
 
Back
Top