Skip to content

fix: preserve blank rows when importing Excel files#5228

Open
biubiukam wants to merge 2 commits into
VisActor:developfrom
biubiukam:fix/issue-5227-excel-leading-blank-row
Open

fix: preserve blank rows when importing Excel files#5228
biubiukam wants to merge 2 commits into
VisActor:developfrom
biubiukam:fix/issue-5227-excel-leading-blank-row

Conversation

@biubiukam

Copy link
Copy Markdown
Contributor

🤔 This is a

  • Bug fix

🔗 Related issue link

Closes #5227

💡 Background and solution

When an Excel worksheet starts with a blank row, ExcelJS reports the number of non-empty rows and columns separately from their last populated coordinates. The importer used those counts as loop bounds, so a valid data row after a blank row was omitted.

This change derives the import bounds from each populated row and cell coordinate, preserving blank rows and columns while retaining all data.

📝 Changelog

Language Changelog
🇺🇸 English Fixed Excel imports that dropped data when the worksheet began with a blank row.
🇨🇳 Chinese 修复 Excel 首行为空时导入结果缺失数据的问题。

☑️ Self-Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🧪 Tests

  • npm run compile (packages/vtable-plugins)
  • ./node_modules/.bin/jest tests/excel-import/excel.test.ts --runInBand --coverage=false

@github-actions github-actions Bot added the chore label Jul 15, 2026
@fangsmile

Copy link
Copy Markdown
Contributor

@biubiukam 请在项目examples的目录下建立对应复现问题的demo进行测试:问题修复前可复现,修复可不可复现

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] excel导入功能处理的文件如果第一行数据为空,渲染结果错误

2 participants