diff --git a/src/ooxml/testcases/org/apache/poi/xssf/SXSSFITestDataProvider.java b/src/ooxml/testcases/org/apache/poi/xssf/SXSSFITestDataProvider.java index 4f2eb40f91..ab84979d09 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/SXSSFITestDataProvider.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/SXSSFITestDataProvider.java @@ -64,7 +64,10 @@ public final class SXSSFITestDataProvider implements ITestDataProvider { */ @Override public XSSFWorkbook writeOutAndReadBack(Workbook wb) { - if(!(wb instanceof SXSSFWorkbook)) { + // wb is usually an SXSSFWorkbook, but must also work on an XSSFWorkbook + // since workbooks must be able to be written out and read back + // several times in succession + if(!(wb instanceof SXSSFWorkbook || wb instanceof XSSFWorkbook)) { throw new IllegalArgumentException("Expected an instance of SXSSFWorkbook"); }