poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52574] New: Sheet.HeaderMargin & Sheet.FooterMargin only supported in XSSF
Date Wed, 01 Feb 2012 18:33:44 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52574

             Bug #: 52574
           Summary: Sheet.HeaderMargin & Sheet.FooterMargin only supported
                    in XSSF
           Product: POI
           Version: unspecified
          Platform: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: gjungman@utilinc.com
    Classification: Unclassified


The below code works in Excel 2007 (XSSF) but not in 2003 (HSSF).  Excel 2003
has header and footer margins.

Code:
        sheet.setMargin(Sheet.HeaderMargin, headerMargin);
        sheet.setMargin(Sheet.FooterMargin, footerMargin);

Error Stack Trace:


java.lang.IllegalArgumentException: Unknown margin constant:  4

        at
org.apache.poi.hssf.record.aggregates.PageSettingsBlock.getMarginRec(

PageSettingsBlock.java:413)

        at
org.apache.poi.hssf.record.aggregates.PageSettingsBlock.setMargin(Pag

eSettingsBlock.java:442)

        at
org.apache.poi.hssf.usermodel.HSSFSheet.setMargin(HSSFSheet.java:1072

)

        at
com.utilinc.planner.b2.b2ii.B2iiToExcel.toExcel(B2iiToExcel.java:1491

-- 
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


Mime
View raw message