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

250
Vistas
Excel to Json File And Json to Excel In Specific Manner Using Javascript

I have a Json Which look like

{
  "2001":{
    "abc":2000,
    "bcd":2005
  },
  "2002":{
    "abc":3000,
    "bcd":3500
  }
}

I want a specific way that converts this Json to excel file. And When that excel file is again converted to Json it should give me above styled json again. Is there any way that I can convert this Json to excel and Excel to Json, but I won't want to change syntex of Json.While the Excel should also show every detail in Json have.

This line fetch data from excel sheet:

var rowMajor = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName], { raw: true, header: 1 });

I am thinking to fetch name of the sheet where the year is been set, and set it as a key to them by local concatenation. Multiple sheet has multiple data which would enclose as seen above in the question. But while reversing the thing 'Json to excel' I am not getting any idea how to do it by code, while the idea to do it is clear.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

you can simply use xlsx library

https://www.npmjs.com/package/xlsx

Ex: XLSX.write(wb, {Props:{Author:"SheetJS"}});

wb: is your data.
and inside {} is your file name(SheetJS name of your file).

about 4 years ago · Juan Pablo Isaza Denunciar
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