Bug 50728 - file error about setting 255th column width
Summary: file error about setting 255th column width
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.7-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 00:27 UTC by katsu
Modified: 2015-05-31 21:47 UTC (History)
0 users



Attachments
java source (678 bytes, text/plain)
2011-02-08 00:29 UTC, katsu
Details
error file (6.00 KB, application/vnd.ms-excel)
2011-02-08 00:30 UTC, katsu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description katsu 2011-02-08 00:27:35 UTC
i setted the width of 255th column. i got a file error when i try to open the Excel file.

Excel version: Microsoft Office Excel 2003 SP3
Comment 1 katsu 2011-02-08 00:29:04 UTC
Created attachment 26618 [details]
java source
Comment 2 katsu 2011-02-08 00:30:56 UTC
Created attachment 26619 [details]
error file
Comment 3 Nick Burch 2011-02-08 07:24:06 UTC
Does the problem happen if you size the 254th cell, or only the 255th? Do all sizings produce the error on the 255th, or only some?
Comment 4 katsu 2011-02-08 18:42:17 UTC
The problem didn't happen when i sized the 254th column.i use the method of setColumnWidth(int columnIndex, int width).if i do sheet.setColumnWidth(255,...) that i always get an error.
Comment 5 Yegor Kozlov 2011-02-10 08:26:15 UTC
Setting width of 255th column works OK for new files. I tested trunk for both HSSF and XSSF. 

Please attach the input .xls file. I suspect it is the culprit.

Yegor
Comment 6 katsu 2011-02-14 01:22:02 UTC
i created a new workbook, and setted the width of 255th column.
please check the source code and the result .xls file that i attachmented on 2011-02-08.
Comment 7 katsu 2011-02-14 01:22:17 UTC
i created a new workbook, and setted the width of 255th column.
please check the source code and the result .xls file that i attachmented on 2011-02-08.
Comment 8 Yegor Kozlov 2011-06-18 09:53:48 UTC
I still can't reproduce it. Setting size of  255th column in a new workbook works OK. Below is my test code that produces output readable both by Excel 2003 and Excel 2010:


        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet sheet = wb.createSheet();

        HSSFCell cell = sheet.createRow(0).createCell(255);
        cell.setCellValue("xxxxxxxxxxx");
        sheet.setColumnWidth(255, 76*256);


        FileOutputStream fileOut = new FileOutputStream("bug-50728.xls");
        wb.write(fileOut);
        fileOut.close();


You sample code depends on "workbook1.xls", if it is required to reproduce the bug then please attach this file too.

I'm using the latest build from trunk.

Yegor
Comment 9 Dominik Stadler 2015-05-31 21:47:58 UTC
No response for a long time, therefore closing this as WORKSFORME. If this is still a problem for you then please reopen the bug and provide more information as discussed in the previous comments.