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

大文件解析返回数量为0 #9

Open
lisen2015 opened this issue Jul 15, 2021 · 2 comments
Open

大文件解析返回数量为0 #9

lisen2015 opened this issue Jul 15, 2021 · 2 comments

Comments

@lisen2015
Copy link

Excel数据量100W,文件大小100M
操作方式:
ExcelBs.newInstance(filePath).bigWriteMode(true).read(User.class);
返回数据量:0

操作方式:
ExcelBs.newInstance(filePath).read(User.class);
抛出异常:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space···

不设置大文件的话走默认方式遇到大文件就内存溢出、设置大文件不抛异常、返回结果为0

辛苦楼主方便看下?

另:是否有更新read不设置对象的解析方式?

@houbb
Copy link
Owner

houbb commented Jul 15, 2021 via email

@houbb
Copy link
Owner

houbb commented Jul 15, 2021

想起来问题的原因了。

如果以 BigWriteMode 输出一个文件的话,这个文件直接用读取是空的。
如果你打开之后,重新保存,然后就可以读取到对应的内容。

猜测原因:直接 BigWriteMode 实际上缺失了一些必要的内容,虽然看以来都正常。
这个问题我以前忘记写了。

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

No branches or pull requests

2 participants