if(styleDxfs != null) dxfs.addAll(Arrays.asList(styleDxfs.getDxfArray()));
CTTableStyles ctTableStyles = styleSheet.getTableStyles();
- if (ctTableStyles != null) {
+ if (ctTableStyles != null && styleDxfs != null) {
int idx = 0;
for (CTTableStyle style : ctTableStyles.getTableStyleArray()) {
tableStyles.put(style.getName(), new XSSFTableStyle(idx, styleDxfs, style, indexedColors));
Assert.assertEquals("", aCell.getStringCellValue());
}
}
+
+ @Test
+ public void testBug64667() throws IOException {
+ //test that an NPE isn't thrown on opening
+ try (Workbook wb = XSSFTestDataSamples.openSampleWorkbook("64667.xlsx")) {
+ int activeSheet = wb.getActiveSheetIndex();
+ }
+ }
}