Posted 13 November 2017, 4:27 pm EST
Hi Team,
I want to make column headers bold and text-align - Center while exporting flexGrid. I am using the following code:
this.flexGrid.itemsSource = this.exportDataSource;
let workBookFont = new WorkbookFont();
workBookFont.bold = true;
wjcGridXlsx.FlexGridXlsxConverter.save(this.flexGrid, {
includeColumnHeaders: true,
includeCellStyles: true,
formatItem: (args: XlsxFormatItemEventArgs) => {
let panel = args.panel, xlsxCell = args.xlsxCell, col = args.col;
if (panel.cellType === wjcGrid.CellType.Cell && col == 1) {
xlsxCell.style.font = workBookFont;
}
}
}, fileName);
I am unable to make column headers as bold.
Thanks
Anshul Parmar