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

229
Views
¿Cómo cargar y convertir un archivo json a un archivo de Excel usando javasxript y html?

Necesito cargar y convertir archivos JSON como

 [ { "First Name": "Paul", "Last Name": "Craig", "Gender": "Male", "Age": 18, "Phone": "072-8074-38" }, { "First Name": "Alan", "Last Name": "Richards", "Gender": "Male", "Age": 22, "Phone": "616-2480-27" } ]

al archivo de Excel. Antes de descargar el archivo, el usuario debe poder obtener una vista previa del archivo. Esto debe hacerse usando HTML y javascript.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede mostrar al usuario los datos JSON usando una tabla html normal

entonces puedes hacerlo así:

 <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.13.1/xlsx.full.min.js"></script> <script> function ExportData() { filename='people.xlsx'; data=[ { "First Name": "Paul", "Last Name": "Craig", "Gender": "Male", "Age": 18, "Phone": "072-8074-38" }, { "First Name": "Alan", "Last Name": "Richards", "Gender": "Male", "Age": 22, "Phone": "616-2480-27" } ] var ws = XLSX.utils.json_to_sheet(data); var wb = XLSX.utils.book_new(); XLSX.utils.book_append_sheet(wb, ws, "People"); XLSX.writeFile(wb,filename); } </script>

¡Esto le permitirá descargar los datos json como un archivo de Excel!

Referencia: Descarga de archivos Javascript JSON a Excel

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!