You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Purna Chandra Rao Duggirala <Pu...@xinthe.com> on 2003/08/14 10:15:27 UTC

How to write unicode characters to the Excel sheet?

Hi all,

I am having a problem writing euro symbol to the excel sheet using POI -
HSSF. I am trying to write somethng similar to this,

String eurosymbl = "EUR";

cell =row.createCell((short)5);
cell.setCellValue(eurosymbl+" is the present currency");

Actually, when i open a sheet usinf HSSF and read the manually entered EURO
symbola and populate it in the new cells, i had NO PROBLEM, but, when i am
trying to write data with unicode characters like euro ( btw, Euro code is
\u20ac ) i am HAVING PROBLEM

Any help in this regard is highly appreciated,

Regards,
Chandoo

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: How to write unicode characters to the Excel sheet?

Posted by Avik Sengupta <av...@apache.org>.
you have to setEncoding(...) 
http://jakarta.apache.org/poi/apidocs/org/apache/poi/hssf/usermodel/HSSFCell.html#setEncoding(short)

On Thu, 2003-08-14 at 13:45, Purna Chandra Rao Duggirala wrote:
> Hi all,
> 
> I am having a problem writing euro symbol to the excel sheet using POI -
> HSSF. I am trying to write somethng similar to this,
> 
> String eurosymbl = "EUR";
> 
> cell =row.createCell((short)5);
> cell.setCellValue(eurosymbl+" is the present currency");
> 
> Actually, when i open a sheet usinf HSSF and read the manually entered EURO
> symbola and populate it in the new cells, i had NO PROBLEM, but, when i am
> trying to write data with unicode characters like euro ( btw, Euro code is
> \u20ac ) i am HAVING PROBLEM
> 
> Any help in this regard is highly appreciated,
> 
> Regards,
> Chandoo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 
-- 
Avik Sengupta <av...@apache.org>


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org