Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read merged cells in stream mode 使用excelize.Rows读取数据,如何知道合并的单元格占用了多少行? #1613

Open
ZQHcode opened this issue Aug 16, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@ZQHcode
Copy link

ZQHcode commented Aug 16, 2023

使用excelize.Rows读取数据,如何知道合并的单元格占用了多少行;目前遇到的场景,有多行数据需要读取,这时候A1、A2这两行的某一列被合并了,代表它其实是一条数据;因为数据量比较大,所以目前只能通过excelize.Rows一行一行读取数据,但是发现返回的数据类型是string,并没有记录每个单元格所占用的长和高,请问可以如何解决呢

@xuri xuri added the enhancement New feature or request label Aug 16, 2023
@xuri
Copy link
Member

xuri commented Aug 16, 2023

The status of merged cells was not stored with the sheet data internal workbook, so you can't get the merge status of the cell by the row's iterator (stream reader). Currently, this library doesn't support getting merged cells in stream mode. Please use the normal mode function GetMergeCells. I'll consider adding support for it later.

@xuri xuri changed the title 使用excelize.Rows读取数据,如何知道合并的单元格占用了多少行? Read merged cells in stream mode 使用excelize.Rows读取数据,如何知道合并的单元格占用了多少行? Aug 16, 2023
@ZQHcode
Copy link
Author

ZQHcode commented Aug 17, 2023

The status of merged cells was not stored with the sheet data internal workbook, so you can't get the merge status of the cell by the row's iterator (stream reader). Currently, this library doesn't support getting merged cells in stream mode. Please use the normal mode function GetMergeCells. I'll consider adding support for it later.

如果使用GetMergeCells获取合并的单元格,是否会一次性将整个excel读入内存呢,还是说采用的io流式的方式从磁盘读取呢

@xuri
Copy link
Member

xuri commented Aug 17, 2023

The function GetMergeCells was a normal mode function, that will parse and load a worksheet to memory without a touch file system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants