mirror of https://github.com/apache/poi.git
Add test case for bug 54399
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1702786 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
118e3ec20a
commit
19246eb4a3
|
@ -924,4 +924,20 @@ public final class TestXSSFWorkbook extends BaseTestWorkbook {
|
||||||
IOUtils.closeQuietly(workbook);
|
IOUtils.closeQuietly(workbook);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testBug54399() throws IOException {
|
||||||
|
XSSFWorkbook workbook = XSSFTestDataSamples.openSampleWorkbook("54399.xlsx");
|
||||||
|
|
||||||
|
//System.out.println("sheets:" + workbook.getNumberOfSheets());
|
||||||
|
|
||||||
|
for (int i = 0; i < workbook.getNumberOfSheets(); i++) {
|
||||||
|
//System.out.println("i:" + i);
|
||||||
|
workbook.setSheetName(i, "SheetRenamed" + (i + 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
// FileOutputStream fileOutputStream = new FileOutputStream("/tmp/54399.xlsx");
|
||||||
|
// workbook.write(fileOutputStream);
|
||||||
|
// fileOutputStream.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue