You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Artur Matos <ar...@yahoo.com> on 2006/10/10 02:34:05 UTC

Setting currency to yen in Excel

Dear all,

I am trying to generate an Excel file with some cells
formatted to display currencies in yen. Until now, I
have been unable to put it to work.

I've found an email in the mailing list explaining how
to do this, back in 2003. I've tried their approach
buy I cannot put it to work, because it seems that the
API changed since then. The email states I can do it
by using the following snippet:

HSSFCellStyle mStyle = vWorkbook.createCellStyle();
mStyle.setDataFormat(HSSFDataFormat.getFormat("[$\u00a5]\\
#,##0.00");

But this doesn't work (at least with the current API),
because setDataFormat is not static. Besides that, I
cannot instantiate my own HSSFDataFormat because it
requires an Workbook reference, and I am using the
user API.

Is it possible to apply this formatting using the user
API?

Best regards,

Artur Matos.




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/