[fix] when first row(s) is empty, query return data will not contain the empty row(s) (#578)

Co-authored-by: hansen <hansen@bytedance.com>
This commit is contained in:
hansen 2024-03-31 23:50:19 +08:00 committed by GitHub
parent b27b169e2a
commit 9e3f1bd58d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -288,11 +288,12 @@ namespace MiniExcelLibs.OpenXml
}
// fill empty rows
if (!(nextRowIndex < startRowIndex))
var expectedRowIndex = isFirstRow ? startRowIndex : nextRowIndex;
if (!(expectedRowIndex < startRowIndex))
{
if (nextRowIndex < rowIndex)
if (expectedRowIndex < rowIndex)
{
for (int i = nextRowIndex; i < rowIndex; i++)
for (int i = expectedRowIndex; i < rowIndex; i++)
{
yield return GetCell(useHeaderRow, maxColumnIndex, headRows, startColumnIndex);
}