https://issues.apache.org/bugzilla/show_bug.cgi?id=56579
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: [email protected]
Reporter: [email protected]
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
http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010342495.aspx?CTT=5&origin=HP005199291
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.
or...
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: [email protected]
For additional commands, e-mail: [email protected]