exceljs / exceljs/exceljs

[BUG] Stream.xlsx.WorkbookReader skipping blank rows

Open
#2,772 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
15.5k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

## 🐛 Bug Report

When reading through an excel file using excelJs.stream.xlsx.WorkbookReader, the stream completely skips blank rows. I am unclear if this is working as intended, but the non-streaming does not behave this way.

Lib version: 4.4.0

## Steps To Reproduce

You can use the attached excel file example with the code below to see this issue:
[SkipLinesExample.xlsx](https://github.com/user-attachments/files/15626318/SkipLinesExample.xlsx)

```javascript
const readStream = fs.createReadStream(filePath);
const workbookReader = new excelJs.stream.xlsx.WorkbookReader(readStream, {});

for await (const worksheetReader of workbookReader) {
for await (const row of worksheetReader) {
console.log(row.number);
}
}
```
You will get row 1, 6, 7, 8...

## The expected behavior:

I expected to get row 1, 2, 3, 4, 5, 6, 7, 8...

If this is working as expected, please point me to the documentation that clarifies that, and I apologize for not being able to find it.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.