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

171
Views
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
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!