0

I use xlsx to write data to xlsx file.

My code :

const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(myData);
const workbook: XLSX.WorkBook = { Sheets: { 'mySheet': worksheet }, SheetNames: ['mySheet'] };
XLSX.writeFile(workbook, 'MyData.xlsx');.

I want to style the cell ,how and whether it can be done?

I tried to use s but it did not work:

worksheet['B1'].s = {font: {bold : true}};

EDIT

"The docs claim that's only available in the pro version"- This comment is true, I did not notice.

So my question is different:

Is there any other way to export to excel file with style?

Hodaya Shalom
  • 4,327
  • 12
  • 57
  • 111

1 Answers1

0

you can use exceljs package instead of xlsx in angular.