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 2016/04/11 17:42:11 UTC
[Bug 59300] New: default sheet name for the 1st sheet has to be
"Sheet1" instead pf "Sheet0"
https://bz.apache.org/bugzilla/show_bug.cgi?id=59300
Bug ID: 59300
Summary: default sheet name for the 1st sheet has to be
"Sheet1" instead pf "Sheet0"
Product: POI
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
Assignee: dev@poi.apache.org
Reporter: vladimir.dolzhenko@gmail.com
When MS Excel, Libreoffice opens - they create an empty spread sheet with name
"Sheet1".
XSSFSheet (and potentially other implementations) calls it "Sheet0" that is
inconvenient.
public XSSFSheet createSheet() {
String sheetname = "Sheet" + (sheets.size());
int idx = 0;
while(getSheet(sheetname) != null) {
sheetname = "Sheet" + idx;
idx++;
}
return createSheet(sheetname);
}
it is worth to change it to
public XSSFSheet createSheet() {
String sheetname = "Sheet" + (sheets.size() + 1);
int idx = 0;
while(getSheet(sheetname) != null) {
sheetname = "Sheet" + idx;
idx++;
}
return createSheet(sheetname);
}
--
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 59300] default sheet name for the 1st sheet has to be "Sheet1"
instead pf "Sheet0"
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59300
Dominik Stadler <do...@gmx.at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
--
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 59300] default sheet name for the 1st sheet has to be "Sheet1"
instead pf "Sheet0"
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59300
Javen O'Neal <on...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|HSSF |SS Common
--
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 59300] default sheet name for the 1st sheet has to be "Sheet1"
instead pf "Sheet0"
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59300
Javen O'Neal <on...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WONTFIX
Status|NEW |RESOLVED
--- Comment #1 from Javen O'Neal <on...@apache.org> ---
This probably won't be fixed as it introduces a behavior change that may subtly
break existing applications, with marginal benefit.
If you need your sheet names to start at "Sheet1", use
Workbook#createSheet(String 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