https://issues.apache.org/bugzilla/show_bug.cgi?id=45260
Summary: Excel file unreadable due to applyFont()
Product: POI
Version: 3.0-dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: critical
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Hi!
We're having a rather big problem at my company with a moderately large Excel
report (6 sheets, 15 columns, maximum 102 rows) using POI.
We do a lot of formatting using about 28 different font styles (arial, 10pt,
12pt, colored, bold, italic ... - half of the fonts are strikeout as we use it
to mark old entries). We have up to 6 different fonts in one cell.
Now, usually the POI-generated Excel-file is readable without any problem, but
SOMETIMES MS Excel can't open it saying that there's "unreadable content". Our
customer needs this 100% working all of the time and I can't figure out the
exact reason. It looks like it has something to do with the applyFont() method.
Because of this I've built in a switch to leave out text formatting. While the
formatted file sometimes can be read, the unformatted ALWAYS can be.
One bugfix that I hoped was to be the solution was to add several blank spaces
at the end of each cell String (I thought that corrupt font indices were the
reason for the error). This worked for some time but now turned out to not
always work.
I've also tried to make BIFF-dumps of the files but can't open the resulting
files with the viewers I've tried out (BIFF-Workbench etc.) ... ?
I hope someone can help me with this, I've been goofing around for ages with
this and have become pretty frustrated.
I don't want to add the generated files as an attachment (this is pretty
sensitive data) but could mail it to someone who can help me. URGENT HELP is
needed here!! :)
Regards, Werner
(btw text formatting on an assembled HSSFRichTextString is quite annoying to do
as you can't append to it ... therefore you have to remember the indices for
applying the fonts and do that after the result string has been pieced
together)
PS opening the file with Open Office always works and saving it with OO makes
the file readable with MS Office (I wish I could convince our customer to use
OO ...)
--
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]