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

248
Views
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 answers
Answer question

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 Report
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!