You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you so much for this library, it saved us alot of time. I have a small question however?
Using the example provided(code below) on the ReadMe.md and version 2.1.0 of the library. The stream closes
but the tmp file still exists until you run 'workbook.close()'. Is this intentional? Should the autoclosable not do this on its own?
try (
InputStream is = new FileInputStream(new File("/path/to/workbook.xlsx"));
Workbook workbook = StreamingReader.builder()
.rowCacheSize(100)
.bufferSize(4096)
.open(is)) {
for (Sheet sheet : workbook){
System.out.println(sheet.getSheetName());
for (Row r : sheet) {
for (Cell c : r) {
System.out.println(c.getStringCellValue());
}
}
}
}
The text was updated successfully, but these errors were encountered:
It should, and I'm not sure why it wouldn't for you. The close() method is
called by the try-with block; Autoclosable classes just have to implement
that method.
On Tue, Jun 1, 2021, 1:11 PM Peter Hoang ***@***.***> wrote:
Using the example provided(code below) on the ReadMe.md and version 2.1.0
of the library. The stream closes
but the tmp file still exists until you run 'workbook.close()'. Is this
intentional? Should the autoclosable not do this on its own?
try (
InputStream is = new FileInputStream(new File("/path/to/workbook.xlsx"));
Workbook workbook = StreamingReader.builder()
.rowCacheSize(100)
.bufferSize(4096)
.open(is)) {
for (Sheet sheet : workbook){
System.out.println(sheet.getSheetName());
for (Row r : sheet) {
for (Cell c : r) {
System.out.println(c.getStringCellValue());
}
}
}
}
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#235>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIYRUCH4KQWGSIT22ELF7TTQUIFLANCNFSM455CR6FQ>
.
Thank you so much for this library, it saved us alot of time. I have a small question however?
Using the example provided(code below) on the ReadMe.md and version 2.1.0 of the library. The stream closes
but the tmp file still exists until you run 'workbook.close()'. Is this intentional? Should the autoclosable not do this on its own?
The text was updated successfully, but these errors were encountered: