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 2010/05/22 21:34:05 UTC

DO NOT REPLY [Bug 49188] autoSizeColumn, ArrayOutOfBounds if more than Short.MAX_VAULE rows

https://issues.apache.org/bugzilla/show_bug.cgi?id=49188

Yegor Kozlov <ye...@dinom.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Yegor Kozlov <ye...@dinom.ru> 2010-05-22 15:34:01 EDT ---
Please post sample code to reproduce the problem.

The following code works fine to me:

    public static void main(String[] args) throws Exception {
        HSSFWorkbook wb = new HSSFWorkbook();
        HSSFSheet sh = wb.createSheet();
        for (int i = 0; i < Short.MAX_VALUE + 5; i++) {
            HSSFRow row = sh.createRow(i);
            for (int j = 0; j < 3; j++) {
                HSSFCell cell = row.createCell(j);
                cell.setCellValue("cell[" + i + "," + j + "]");
            }
        }
        for (int j = 0; j < 5; j++) {
            sh.autoSizeColumn(j);
        }
    }

Yegor

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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