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 2003/11/03 15:16:26 UTC
DO NOT REPLY [Bug 24355] New: -
Cannot create sheet with over 8215 datapoints
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24355>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24355
Cannot create sheet with over 8215 datapoints
Summary: Cannot create sheet with over 8215 datapoints
Product: POI
Version: 2.0-pre3
Platform: All
OS/Version: All
Status: NEW
Severity: Critical
Priority: Other
Component: HSSF
AssignedTo: poi-dev@jakarta.apache.org
ReportedBy: daniel.shinton@mci.com
This bug is present on both Win32 and Solaris Sparc.
When trying to create a spreadsheet with over 8215 datapoints, the resultant
xls file becomes corrupt. Excel attempts to repair the document, but some of
the data at the end of the file is lost. The following are the maximum sizes of
spreadsheets I could create w/o corruption:
8215 rows, 1 column
4107 rows, 2 columns
2738 rows, 3 columns
I am using JDK 1.4.2. I am using Excel 2002 SP-2.
The following is the code I used to produce the problem:
public void createFile(String filename, int height, short width) throws
Exception {
FileOutputStream fileOut = new FileOutputStream(filename);
HSSFWorkbook wb;
HSSFSheet sheet;
HSSFRow row;
HSSFCell cell;
int counter = 0;
wb = new HSSFWorkbook();
sheet = wb.createSheet("Test sheet");
for (int i = 0; i < height; ++i) {
row = sheet.createRow(i);
for (short s = 0; s < width; ++s) {
++counter;
cell = row.createCell(s);
cell.setCellValue(String.valueOf(counter));
}
}
wb.write(fileOut);
fileOut.close();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org