无法找到在Apache WorkbookFactory close()方法 [英] cant find close() method on Apache WorkbookFactory
问题描述
导都说完成后关闭工作簿。
工作簿使用后应关闭
但我没有close方法将其关闭。
怎么会被关闭?
工作簿WB = WorkbookFactory.create(临时文件);
wb.close();
我与Apache的POI Maven的工作,3.9版
close方法()是未定义的类型工作簿...线423 Java问题
注1:,为了正确地释放资源工作簿使用后应关闭。
注2:也从InputStream装车需要更多的内存比从文件加载
我想使用像这一一> sayes
找不到在Apache WorkbookFactory close()方法
块引用>您需要关闭
工作簿
,而不是它的工厂。
注1:,为了正确地释放资源工作簿应使用后关闭
块引用>正确的。
注2:也是从那个加载一个
的InputStream
需要比加载更多的内存文件
块引用>不真实的,除非
的InputStream
是ByteArrayInputStream的
。i read about Apache WorkbookFactory
the guide are saying to close workbook when done. "Workbook should be closed after use"
but i dont have a close method to close it.
how could it be closed ?
Workbook wb = WorkbookFactory.create(tempFile); wb.close();
i'm working with Apache poi Maven, version 3.9
The method close() is undefined for the type Workbook ... line 423 Java Problem
Note 1: that in order to properly release resources the Workbook should be closed after use.
Note 2: also that loading from an InputStream requires more memory than loading from a File
i would like to use a file and not an input stream like this one sayes
解决方案cant find close() method on Apache WorkbookFactory
You need to close the
Workbook
, not its factory.Note 1: that in order to properly release resources the Workbook should be closed after use.
Correct.
Note 2: also that loading from an
InputStream
requires more memory than loading from aFile
Untrue, unless the
InputStream
is aByteArrayInputStream
.这篇关于无法找到在Apache WorkbookFactory close()方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!