Hi,
I am able to write the values to excel rows using the below code.
foreach (var item in ExcelData) { DocumentFormat.OpenXml.Spreadsheet.Row newRow = new DocumentFormat.OpenXml.Spreadsheet.Row(); DocumentFormat.OpenXml.Spreadsheet.Cell cellComponent = new DocumentFormat.OpenXml.Spreadsheet.Cell(); cellComponent.DataType = DocumentFormat.OpenXml.Spreadsheet.CellValues.String; cellComponent.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(item.ComponentName); newRow.AppendChild(cellComponent); DocumentFormat.OpenXml.Spreadsheet.Cell cellProperty = new DocumentFormat.OpenXml.Spreadsheet.Cell(); cellProperty.DataType = DocumentFormat.OpenXml.Spreadsheet.CellValues.String; cellProperty.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(item.Property); newRow.AppendChild(cellProperty); DocumentFormat.OpenXml.Spreadsheet.Cell cellExpression = new DocumentFormat.OpenXml.Spreadsheet.Cell(); cellExpression.DataType = DocumentFormat.OpenXml.Spreadsheet.CellValues.String; cellExpression.CellValue = new DocumentFormat.OpenXml.Spreadsheet.CellValue(item.Expressions); newRow.AppendChild(cellExpression); sheetData.Append(newRow); }
Now how can I add three column headers in this code with Bold Font?