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

196
Vistas
Best way to parse a CSV into a JS app, create, and let the user populate a new column?

I need to parse a CSV file to json (or array, still trying to search for the best method!),

  • show the data to the user in a container,
  • create a new column on that same csv for LABELLING, and letting the user populate it according to clicking some buttons on the app,
  • and save the new schema to local computer.

How should I approach this problem?

I've been reading into data-grid, handsontable and papaParser, but I'm still very confused. I'm still kind of a beginner at javascript. It would be a big help if you could give me the big picture on the best way in how proceed with this, I'm sure I could troubleshoot the technical details on my own. Thanks in advance!

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

0

Handsontable does not allow you to use CSV as the datasource so you would need to parse it to JSON first using another library. Using JSON itself requires some additional setup - especially when you have a nested structure of data. Then you might need to use the columns option the specify objects for a given column.

Within the abilities of that grid, you can alter columns and those would be reflected in a new CSV file generated by the exportToFile plugin.

The exportToFile plugin allows you to set some values as the delimiter or ability to show/hide headers to keep the consistency with your input CSV structure.

Example

const exportPlugin = hot.getPlugin('exportFile');

button.addEventListener('click', () => {
  exportPlugin.downloadFile('csv', {
    bom: false,
    columnDelimiter: ',',
    columnHeaders: false,
    exportHiddenColumns: true,
    exportHiddenRows: true,
    fileExtension: 'csv',
    filename: 'Handsontable-CSV-file_[YYYY]-[MM]-[DD]',
    mimeType: 'text/csv',
    rowDelimiter: '\r\n',
    rowHeaders: true
  });
});
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