poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Donahue, Michael" <michael.dona...@pearson.com>
Subject HSSF POI Header/Footer problem.
Date Fri, 13 Jan 2006 16:09:56 GMT
Hello Everyone -



I'm having some problems with headers and footers getting corrupted after
the HSSF API has read the file, had some modifications, and wrote back out.
I started with a template created with pre-defined headers & footers which
printed out fine.  The template was created in Excel 2003 and saved as an
Excel 97-2000 format document.

I then filled out a bunch of fields with POI HSSF which all worked fine, but
when I tried to print the updated file I found that any header or footer
that had a hyphen in it would print full of garbage.  ( It looked a little
like a Unicode dump of the header/footer.)


What I've tried:

So I decided to see what the HSSFHeader and HSSFooter thought was in the
fields just after I initially loaded the templates from the file.  On most
of the headers or footers that have a hyphen in them, the corresponding
header/footer showed a null value.  All other headers and footers appeared
to have valid header/footer data.  What I suspect is happening is that when
the parser is reading in the template file, it has problems reading headers
or footers with a hyphen in them.  So I decide, heck I can just write my own
new headers and footers into the updated file and work around the load
parser problem and then I ran into different issue.  When I tried to print
the new workbook from Excel, the headers and footers printed fine except the
hyphens.  The hyphens printed as a square box as if the printer didn't
recognize the character.


Has anyone else seen this behavior or know of a way to get either the
template or the updated headers/footers to work correctly?




- Mike Donahue


In the footers/headers I'm using Ariel for a font, Regular & Bold for
stylse, and sizes 5,6,7,8, & 10.


This email may contain confidential material. 
If you were not an intended recipient, 
Please notify the sender and delete all copies. 
We may monitor email to and from our network. 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message