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

236
Vistas
How do to upload and convert json file to excel file in using javasxript and html

I need to upload and convert JSON files like

[
    {
        "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"
    }
]

to excel file. Before downloading the file user must be able to preview the file. This needs to be done using HTML and javascript

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

0

You can show the user the JSON Data using a normal html table

then you can do it like this:

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

This will let you download the json data as an excel file!

Reference: Javascript JSON to Excel file download

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