poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 56579] New: Cell Value - String 32,767 Character Limit
Date Fri, 30 May 2014 04:09:56 GMT

            Bug ID: 56579
           Summary: Cell Value - String 32,767 Character Limit
           Product: POI
           Version: 3.10
          Hardware: Macintosh
            Status: NEW
          Severity: minor
          Priority: P2
         Component: SXSSF
          Assignee: dev@poi.apache.org
          Reporter: mhager@w2odigital.com

There is a 32,767 max character limit for strings in Excel. If one writes an
XML file that exceeds this limit, the file is subject to inspection and
correction by Excel on the first load (which is really annoying). 

Microsoft Documentation On Limit

Workaround (Caller - Example)
cell.setCellValue(toWrite.length() > 32767 ? toWrite.substring(0, 32767 - 3) +
"..." : toWrite);

Proposed Solution
Simply truncate the string the same way Excel would truncate the string upon
first inspection and load and provide sufficient documentation alerting users
of the what a cell value can hold.


Either throw a RuntimeException alerting the user of the impending error

I'll open for discussion if you would like a pull request, please, just let me
know and I'd be happy to put one together, with a test for the team.

Thank You!

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

View raw message