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

178
Vistas
SheetJS parse empty cell as empty string

I have a simple csv where one cell is empty:

"category","name"
"blue","foo"
"red","bar"
,"baz"

I am reading the csv from file via

const workbook = XLSX.read(data, { type: 'string'  })

The resulting sheet for workbook.sheets.sheet1 is:

A1: Object { t: "s", v: "category", w: "category" }
A2: Object { t: "s", v: "blue" }
A3: Object { t: "s", v: "red" }
B1: Object { t: "s", v: "name", w: "name" }
B2: Object { t: "s", v: "foo" }
B3: Object { t: "s", v: "bar" }
B4: Object { t: "s", v: "baz" }

Obviously A4 is missing, since it's not present, however I'd like to treat it as empty String "" but without manually fiddling the CSV file but during the parsing step.

I checked the parsing options but none from them seem to be helpful for that use case.

Is there a way to treat A4 as empty String?

about 4 years ago · Juan Pablo Isaza
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