Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

139
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda