Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

130
Views
Convert json to Excel with evaluating formulae in chrome extension

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?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!