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 2006/10/27 16:35:27 UTC
DO NOT REPLY [Bug 40829] New: - file corrupt if template excel file contained
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40829>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40829
Summary: file corrupt if template excel file contained
Product: POI
Version: 3.0-dev
Platform: All
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: poi-dev@jakarta.apache.org
ReportedBy: M.Bisping@gmx.de
Excel 2003 puts out an error message when opening a POI-produced excel workbook
which
- was created from an existing excel workbook file
- contained sheets with PageSetup.PrintTitleRows set and
- one of those sheets is removed from the workbook before saving.
public class TestRepeatingRowsAndColumns
{
public static void main(String args[]) {
try {
test();
} catch (Exception e) {
e.printStackTrace();
}
}
public static void test() throws Exception
{
java.io.FileInputStream fis =
new java.io.FileInputStream("test.xls");
//http://www.mbisping.de/test.xls
org.apache.poi.poifs.filesystem.POIFSFileSystem fs = new
org.apache.poi.poifs.filesystem.POIFSFileSystem(
fis);
HSSFWorkbook wb = new HSSFWorkbook(fs);
fis.close();
int sheetCount = wb.getNumberOfSheets();
//removing repeating Rows/Cols before deleting doesn't help
wb.setRepeatingRowsAndColumns(sheetCount-1,-1,-1,-1,-1);
wb.removeSheetAt(sheetCount-1);
FileOutputStream out = new FileOutputStream("testout.xls");
wb.write(out);
out.close();
}
}
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
DO NOT REPLY [Bug 40829] - file corrupt if sheets with printTitleRows set are removed
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40829>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40829
M.Bisping@gmx.de changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|file corrupt if template |file corrupt if sheets with
|excel file contained |printTitleRows set are
| |removed
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/