Skip to content

Fix QueryAsDataTable can't read Excel with only header rows - #647

Merged
shps951023 merged 2 commits into
mini-software:masterfrom
izanhzh:master
Aug 13, 2024
Merged

Fix QueryAsDataTable can't read Excel with only header rows#647
shps951023 merged 2 commits into
mini-software:masterfrom
izanhzh:master

Conversation

@izanhzh

@izanhzh izanhzh commented Aug 12, 2024

Copy link
Copy Markdown
Member

QueryAsDataTable不推荐使用,但是有些特殊情况下还是很好用的,目前发现如果Excel只有一个表头行时,无法正确读取,读取到的DataTable会没有任何列,这个PR修复了此问题

@shps951023 shps951023 changed the title 修复QueryAsDataTable无法正确读取只有表头行的Excel Fix QueryAsDataTable can't read Excel with only header rows Aug 13, 2024
@shps951023
shps951023 merged commit 4b7f169 into mini-software:master Aug 13, 2024
@shps951023

Copy link
Copy Markdown
Member

@izanhzh 👍👍 Merged!

@Ramon403

Copy link
Copy Markdown

你这个又引发另外一个问题,如果csv 的表头有10列,内容只有8列,就会报错列9找不到,以前版本不会,找不到的列,你就填空别~

@izanhzh

izanhzh commented Apr 29, 2025

Copy link
Copy Markdown
Member Author

你这个又引发另外一个问题,如果csv 的表头有10列,内容只有8列,就会报错列9找不到,以前版本不会,找不到的列,你就填空别~

正常格式的CSV,表头和内容的列数是一致的,如果是用逗号作为分隔符,应该是类似这样: 1,2,3,4,5,6,7,,,10

pull Bot pushed a commit to zilo555/MiniExcel that referenced this pull request Aug 29, 2026
…tware#647)

* Fixed an issue with QueryAsDataTable that only header rows cannot be read correctly

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants