sheet_to_json does not skip blank rows
See original GitHub issueI have the following configuration which works fine in general:
let lte = await XLSX.utils.sheet_to_json(workbook.Sheets['Sheet1'], {
blankRows: false,
defval: '',
});
However, I have an excel with 14K rows. I deleted the values in all but one row for test (there is styling in empty rows such as borders and colors but no values). When parsing, sheetjs still attempts to parse all of 14K rows for some reason.
Any ideas what’s causing it ?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:17 (4 by maintainers)
Top Results From Across the Web
SheetJS shows blank rows - Stack Overflow
In order to remove the rows without any data you can use the option blankRows: false , like this: const data = XLSX.utils.sheet_to_json(ws, ......
Read more >Utility Functions - SheetJS Community Edition
All fields from each row will be written! header hints at a particular order but is not exclusive. To remove fields from the...
Read more >docbits/82_util.md | sheetjs@v0.18.3 - Deno
When header is 1 , the default is to generate blank rows. blankrows must be set to false to skip blank rows. When...
Read more >xlsx - npm
The library does not impose a separate lifecycle. ... The sheet_to_json utility function walks a workbook in row-major order, generating an ...
Read more >How to Remove Blank Rows in Excel (Quick & Easy)
Having a dataset with blank or empty rows can lead to confusion or give the impression that data is missing when it might...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I faced the same issue, and after spending 1 hour, I decided to take a look at the function and discovered that the keyname is NOT camelcase, as documented. So use, blankrows NOT blankRows
I am experiencing this issue when trying to read an xlsx file from user upload that contains empty formulas. For example, I have cells that are empty that contain a formula such as
=IF($A12 <> "", VLOOKUP(ObjectivesUI!G12,ENUM!E:F,2,0),"")
The imported cells look like{ t: "s", v: "" }
and nothing I do will filter them out.This is what my import function looks like:
I’m on version 0.17.5. Please help.