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

          Priority: P2
            Bug ID: 53414
          Assignee: [email protected]
           Summary: Dimension of the sheet not updated properly when
                    adding column
          Severity: major
    Classification: Unclassified
                OS: Windows XP
          Reporter: [email protected]
          Hardware: PC
            Status: NEW
           Version: 3.8
         Component: HSSF
           Product: POI

Our excel generation is based on templates where we duplicate rows and columns
as necessary to fit the data that is fed into them. In this particular usecase
we add 23 rows and one column. Our counterparty uses jxl 2.5.5 to parse the
incoming xls files generated by our poi setup. The added rows do not pose a
problem but the added column does. The problem is that the values in the added
column are not parsed and instead jxl outputs warnings:

Warning: Cell D1 exceeds defined cell boundaries in Dimension record (3x42)
Warning: Cell D2 exceeds defined cell boundaries in Dimension record (3x42)
Warning: Cell D3 exceeds defined cell boundaries in Dimension record (3x42)
Warning: Cell D4 exceeds defined cell boundaries in Dimension record (3x42)
Warning: Cell D5 exceeds defined cell boundaries in Dimension record (3x42)

You will note that more recent version of jxl do parse the excel correctly but
only because they adjusted their error handling. The excels generated by apache
poi still seem to have the wrong dimension.

Updating the org.apache.poi.hssf.model.InternalSheet.addValueRecord() method
from if (col.getColumn() > d.getLastCol())  to if (col.getColumn() >=
d.getLastCol()) fixes the problem in our usecase.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to