Hi am trying to export my data(json) into an excel sheet using XLSX , only value is getting set using cell.v but styles are not getting set using cell.s . Below is the code snippet .
Node version - v8.11.1
NPM version - 5.6.0
const worksheet: XLSX.WorkSheet = XLSX.utils.json_to_sheet(json);
const workbook: XLSX.WorkBook = { Sheets: { 'Report': worksheet }, SheetNames: 'REPORT' };
worksheet['A1'].v='test value';
worksheet['A1'].s = {fill:{fgColor: {rgb:"86BC25"}}};
const data: Blob = new Blob([buffer], {type: EXCEL_TYPE});
FileSaver.saveAs(data, fileName + new Date().getTime() + EXCEL_EXTENSION);
Kindly let me know if anything is missing here .
Also, i tried replacing XLSX with XLSX-populate , but it says xlsx-populate not found .
me too
me too
For anyone wondering in the future. Styling cells is a pro feature of SheetJS.