I have a list of js objects which look like this:
{
"data1": "value",
"data2": "value",
"data3": "value",
"data4": "value",
"Total Reviews Count (ASIN)": `=IF(A${idx}=1; SUM(C${idx}:G${idx}); 0)`,
"Total Rating (ASIN)": `=IF(H${idx}>0; IF(A${idx}=1; SUM(C${idx}*5;D${idx}*4; E${idx}*3; F${idx}*2; G${idx}*1) / H${idx}; 0); 0)`,
"Total Rating*Review": `=IF(A${idx}=1; H${idx}*I${idx}; 0)`,
}
I'm using a downloaded xlsx library (SheetsJS I guess) as a content script to convert it to xlsx and download the file in Chrome extension:
let worksheet = XLSX.utils.json_to_sheet(res)
let workbook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(workbook, worksheet, "First");
XLSX.writeFile(workbook, "res.xlsx")
The problem is that instead of evaluating the formulae and putting corresponding values, excel shows the formulae itself. When opening the file and changing cell data type from text to formula, it works as needed. In xlsx docs it says that I need a pro version or something to do that, is there a way to achieve this without any pro version to make it work in chrome extension environment?