Parsing sheets with empty cell data, result in mismatch of table heading and data
See original GitHub issueHere is an exampel of the issue, imagine this is the excel file:
A1 | B1 | C1 |
---|---|---|
Field 1 | Field 2 | Field 3 |
1 | 3 |
I parse the file as a following:
const workbook = XLSX.read(fileStream, {
type: 'buffer',
sheetStubs: true
});
const reuslt = XLSX.utils
.sheet_to_json(book.Sheets[book.SheetNames[0]], { defval: '' })
.pop();
What i get as a result
is the following
{
"Field 1": "1",
"Field 2": "3",
"Field 3": ""
}
Any idea on how this can be fixed? The browser examples have the same issue.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Formula Parse Errors In Google Sheets And How To Fix Them
This formula parse error happens when a number is divided by zero, which can occur when you have a zero or a blank...
Read more >How do I fix the "Missing column headers" error message?
1 Open the import file in Excel. · 2 Select everything (Ctrl + A). · 3 In the Cells group under the Home...
Read more >How to compare data in two Google sheets or columns - Ablebits
Learn different ways of comparing data in two Google sheets or columns and identifying duplicate and unique records.
Read more >DateTime format mismatch on importing from Excel Sheet
When linking Excel spreadsheets in MS Access, a problem arises when a column has mixed data types. For example, ...
Read more >Data Import error message reference - Analytics Help
Message Meaning So...
Empty column header at column number X. The upload file is missing a column header. Ed...
Multiple errors occurred: List of multiple...
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
Have the same issue.
Please share a sample file, what you expect to happen and what is actually happening