JExcel 输出问题
我正在尝试使用 JExcel 在 Java 中写入 Excel 工作表。我成功写出,但是我不断遇到“java.lang.OutOfMemory:Java堆空间”错误。据我所读,有两种解决方案。
1)更改我的Eclipse设置,我已经这样做了,但似乎没有产生任何影响。
我的设置如下,如果有任何问题,请告诉我(升级 Xmx 并添加最后一行):
-XX:MaxPermSize=256m
-Xms128m
-Xmx2048m
-XX:+UseParallelGC
2)关闭工作簿以刷新输出,然后重新打开并附加下一行或下一组行。
我无法弄清楚这一点,因为我找不到任何相关文档。当我关闭 WritableWorkbook(名为 wwb)时,我不知道如何打开它。我最终写了一行,然后由于 wwb 关闭而收到 Null 错误。
感谢您提前提供的所有帮助。
I'm trying to write out to an Excel Sheet in Java using JExcel. I successfully write out, however I keep running into the "java.lang.OutOfMemory: Java heap space" error. From what I've read there are two solutions.
1) Change My Eclipse settings, which I have done and seems to have not made a difference.
My settings are as follows, please let me know if anything looks wrong (Upped Xmx and added the last line):
-XX:MaxPermSize=256m
-Xms128m
-Xmx2048m
-XX:+UseParallelGC
2) Close the workbook to flush output, then reopen and append the next line or group of lines.
This I cannot figure out since I can't find any documentation on it. When I close my WritableWorkbook (named wwb), I'm not sure how to open it. I end up writing out one line and then getting a Null error since wwb is closed.
Thanks for all the help in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我最终切换到 SuperCSV,效果很好。我也尝试过 OpenCSV,但是它不能正确转义逗号
I ended up switching to SuperCSV, works great. I had also tried OpenCSV, however it does not escape commas properly