https://bz.apache.org/bugzilla/show_bug.cgi?id=58064
John Jiang <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW --- Comment #2 from John Jiang <[email protected]> --- Test Excel(xlsx): New one Excel file on windows platform, open it, select Cell D4 and set cell value to "=IFERROR(VLOOKUP(C4,'Country List'!$A$1:$B$251,2,0),"")"(except outside "). 'Country List' is a sheet, contains the conntry name list, col A full contry name, col B abbreviation. Test Code: @Test public void testRenameSheet() throws IOException, InvalidFormatException { String filePath = "D:\\win7temp\\testiferror.xlsx"; Workbook book = WorkbookFactory.create(new File(filePath)); Sheet sheet = book.getSheetAt(0); System.out.printf("origin name:%s \n", sheet.getSheetName()); book.setSheetName(0, "NewSheetName"); System.out.printf("rename over!"); } Output is: origin name:Sheet1 java.lang.NullPointerException at org.apache.poi.xssf.usermodel.helpers.XSSFFormulaUtils.updatePtg(XSSFFormulaUtils.java:128) at org.apache.poi.xssf.usermodel.helpers.XSSFFormulaUtils.updateFormula(XSSFFormulaUtils.java:98) at org.apache.poi.xssf.usermodel.helpers.XSSFFormulaUtils.updateSheetName(XSSFFormulaUtils.java:78) at org.apache.poi.xssf.usermodel.XSSFWorkbook.setSheetName(XSSFWorkbook.java:1361) at com.lrm.test.POICopyUtilTest.testRenameSheet(POICopyUtilTest.java:36) -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
