Is there a way to make the column titles bold in an Excel worksheet using the json_to_sheet function? Specifically, how can I bold the ID or format the first cell?
var ws = XLSX.utils.json_to_sheet([{ID:"ID"}], {header: ["ID"], skipHeader: true});
let excelFileName='Exported Serviceberichte';
const workbook: XLSX.WorkBook = { Sheets: { 'data': ws }, SheetNames: ['data'] };
const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });
this.saveAsExcelFile(excelBuffer, excelFileName);
ID
2
3
4
This is the desired format.