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

225
Vistas
Read csv file in JavaScript array with Chrome extension using Papa Parse

I want the user to be able to select a single column CSV file, which then gets loaded in a 1D Javascript array.

I'm trying to do this with Papa Parse and when I try my code in a codepen it works, so the issue must be with the Chrome extension environment.

popup.html:

<!DOCTYPE html>
<html>

<head>
</head>

<body>
    <form id="csvForm">
        <label for="avatar">Select a csv list:</label>
        <input type="file" id="csvFile" accept=".csv">
        <input type="submit" id="load" value="Load">
    </form>
    
    <script src="papaparse.min.js"></script>
    <script src="popup.js"></script>
</body>

</html>

popup.js:

let loadButton = document.getElementById("load").addEventListener("click", () => {
    Papa.parse(document.getElementById("csvFile").files[0], {
        download: true,
        header: false,
        complete: function (results) {
            console.log(results);
        },
    });
});
about 4 years ago · Santiago Gelvez
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