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

[BUG] This xlsx file that cannot be opened seems to be stuck #6

Open
zurmokeeper opened this issue Jul 4, 2023 · 4 comments
Open
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@zurmokeeper
Copy link
Owner

🐛 Bug Report

Can not open this file.

Lib version: 4.4.2

Source problem address

Steps To Reproduce

(async () => {
  const workbook = new ExcelJS.Workbook();
  const fund = await workbook.xlsx.readFile('/path/to/hang.xlsx');
  const sheet = fund.worksheets[0];
  console.log(sheet);
})()

The expected behaviour:

Possible solution (optional, but very helpful):

@zurmokeeper zurmokeeper self-assigned this Jul 4, 2023
@zurmokeeper zurmokeeper added bug Something isn't working help wanted Extra attention is needed labels Jul 4, 2023
@zurmokeeper
Copy link
Owner Author

Found this due to the data validation in the excel file has Q13:Q1048576 H13:H1048576 these so large range of validation, resulting in exceljs to read too much range, and then generate too many dataValidation objects, there are millions, stuck. Then the program just keeps stopping there.

Now is thinking how can I reproduce the problem and what to do when I encounter this problem?

@bleehome
Copy link

bleehome commented Jul 4, 2023

Screen.Recording.2023-07-04.at.17.39.05.mov

@zurmokeeper
Copy link
Owner Author

@bleehome 这个视频的意思就是这样设置就会100多万的单元格也设置了数据有效性验证?

@zurmokeeper
Copy link
Owner Author

@bleehome 我在V4.4.6版本加入了读取excel的时候加入忽略节点参数(ignoreNodes)可以暂时解决这个问题,通过忽略数据有效性节点来处理,具体使用可以看这里 https://github.com/zurmokeeper/excelize/releases/tag/4.4.6,不过这个只是治标的方法,治本的还得再想想。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants