'Format Excel Columns from Angular

I'm trying to bold the column titles from an excel worksheet, using the json_to_sheet function. 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 how it should look.



Solution 1:[1]

How to Bold Specific Cell 'A1' for example:

workSheet.Cells[1, 1].Font.Bold = true;

More examples: https://stackoverflow.com/a/19883924/15439733

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joosep Parts