You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2015/06/21 05:51:57 UTC
[Bug 58064] New: rename sheet error when sheet contains IFERROR
function
https://bz.apache.org/bugzilla/show_bug.cgi?id=58064
Bug ID: 58064
Summary: rename sheet error when sheet contains IFERROR
function
Product: POI
Version: 3.11-FINAL
Hardware: PC
Status: NEW
Severity: critical
Priority: P2
Component: XSSF
Assignee: dev@poi.apache.org
Reporter: jiangguangtao@foxmail.com
I want to rename a Excel Sheet, most of the time is ok, but yesterday I rename
a sheet with IFERROR function, throw a NullPointException.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 58064] rename sheet error when sheet contains IFERROR function
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58064
John Jiang <ji...@foxmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #4 from John Jiang <ji...@foxmail.com> ---
(In reply to Dominik Stadler from comment #1)
> Can you provide details, i.e. a sample file and a piece of self-contained
> code which reproduces the problem?
I test it on POI 3.12 is ok.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 58064] rename sheet error when sheet contains IFERROR function
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58064
John Jiang <ji...@foxmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #2 from John Jiang <ji...@foxmail.com> ---
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 58064] rename sheet error when sheet contains IFERROR function
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58064
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Can you provide details, i.e. a sample file and a piece of self-contained code
which reproduces the problem?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 58064] rename sheet error when sheet contains IFERROR function
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58064
--- Comment #3 from John Jiang <ji...@foxmail.com> ---
Created attachment 32851
--> https://bz.apache.org/bugzilla/attachment.cgi?id=32851&action=edit
test iferror function on POI 3.11 when set new sheet name.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
[Bug 58064] rename sheet error when sheet contains IFERROR function
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58064
John Jiang <ji...@foxmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |APIBug, ErrorMessage
OS| |All
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org