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

           Summary: setSheetOrder() breaks inter-sheet references
           Product: POI
           Version: 3.5-FINAL
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=24625)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24625)
Run this file; a spreadsheet with the problem is dumped to stdout.

If you call setSheetOrder() on sheets on a workbook with inter-sheet references
(e.g., a formula like ='Sheet 2'!A3 on Sheet 1), the references can be broken.
The attached Java file shows how to reproduce the bug.

Tested with POI 3.5-FINAL (poi-bin-3.5-FINAL-20090928.tar.gz) on Debian with
this Java:

java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Server VM (build 14.2-b01, mixed mode)

And OpenOffice.org 3.1.1.

Resolution: I avoided the bug by creating all sheets at once in the order in
which they would stay in the final file. An easy workaround would be to add a
sentence to the documentation of setSheetOrder() warning the user that it may
break references.

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to