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

           Summary: header overflow
           Product: POI
           Version: 3.0-dev
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ErrorMessage
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


When header length more than 255 symbols (maximum allowed by xls format)
java.lang.ArrayIndexOutOfBoundsException occures

Code:
HSSFWorkbook workBook = new HSSFWorkbook();
HSSFSheet sheet = workBook.createSheet("Sheet 1");
sheet.getHeader().setCenter(reportTitle);

Exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException
        at java.lang.System.arraycopy(Native Method)
        at org.apache.poi.util.StringUtil.putUnicodeLE(StringUtil.java:208)
        at
org.apache.poi.hssf.record.HeaderRecord.serialize(HeaderRecord.java:179)
        at org.apache.poi.hssf.model.Sheet.serialize(Sheet.java:825)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:1188)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:1118)
        at poiutils.HSSFUtils.flushWorkBook(HSSFUtils.java:170)
        at POITest.main(POITest.java:45)


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