You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Martijn vdGraaff <mv...@gmail.com> on 2011/01/19 13:39:04 UTC
Excel workbook handling and encoding
Hi,
I'm processing large amounts of data via excel -> poi. This works
great but cannot find anything on encoding issues.
Via the excel workbook I'm getting a value like: Açık this becomes in XML Aç?k.
Any info about encoding handling would be appreciated.
Martijn
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Excel workbook handling and encoding
Posted by Mark Beardsley <ma...@tiscali.co.uk>.
Then, unless I am missing something, you are not using POI to do the work for
you but one of the classes in the core Java api. I have never used this
approach myself but have done something similar to parse HTML markup. There,
I had to create a class that could be used, vis the callback mechanism, to
actually handle the documents contents. When reading the contents, I woulod
have to code to handle any Unicode 'issues' and I suspect that you will have
to do likewise.
If you were to use POI, then, as NIck indicated, it would take care of
character encoding concerns for you.
Yours
Mark B
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/Excel-workbook-handling-and-encoding-tp3347753p3348193.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Excel workbook handling and encoding
Posted by Martijn van der Graaff <mv...@gmail.com>.
Hi,
What I'm doing is as follows:
javax.xml.parsers.DocumentBuilderFactory fac = javax.xml.parsers.DocumentBuilderFactory.newInstance();
Document doc = builder.newDocument();
Create a new node for each sheet, iterate over the cell and add them as an child element to the node.
Then I return the document to the client.
Yours,
Martijn
On Jan 19, 2011, at 1:44 PM, Nick Burch wrote:
> On Wed, 19 Jan 2011, Martijn vdGraaff wrote:
>> I'm processing large amounts of data via excel -> poi. This works great but cannot find anything on encoding issues.
>
> POI handles it all for you. POI gives you back real java (unicode) strings
>
>> Via the excel workbook I'm getting a value like: Açık this becomes in XML Aç?k.
>
> Sounds like a problem with how you're serialising your xml?
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org
Re: Excel workbook handling and encoding
Posted by Nick Burch <ni...@alfresco.com>.
On Wed, 19 Jan 2011, Martijn vdGraaff wrote:
> I'm processing large amounts of data via excel -> poi. This works great
> but cannot find anything on encoding issues.
POI handles it all for you. POI gives you back real java (unicode) strings
> Via the excel workbook I'm getting a value like: Açık this becomes in
> XML Aç?k.
Sounds like a problem with how you're serialising your xml?
Nick