Fix example. If you don't call super for the non-ignored sheets, everything breaks because you end up with an empty workbook.

https://bz.apache.org/bugzilla/show_bug.cgi?id=58219

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1722457 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
David North 2015-12-31 18:15:35 +00:00
parent 7f105042ba
commit 069d7c6141

View File

@ -43,8 +43,8 @@ public class HybridStreaming {
XSSFWorkbook workbook = new XSSFWorkbook(sourceBytes) { XSSFWorkbook workbook = new XSSFWorkbook(sourceBytes) {
/** Avoid DOM parse of large sheet */ /** Avoid DOM parse of large sheet */
public void parseSheet(java.util.Map<String,XSSFSheet> shIdMap, CTSheet ctSheet) { public void parseSheet(java.util.Map<String,XSSFSheet> shIdMap, CTSheet ctSheet) {
if (SHEET_TO_STREAM.equals(ctSheet.getName())) { if (!SHEET_TO_STREAM.equals(ctSheet.getName())) {
return; super.parseSheet(shIdMap, ctSheet);
} }
}; };
}; };