Hi Björn.

So I'll also test it with POI 2.5 but because of your answer I think the
result will be the same.

In the attachment is a small example class generating a small file using
an empty Excel file as template.

Regards,        Karl-Heinz.


-----Ursprüngliche Nachricht-----
Von: Mehner, Björn [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 23. Juni 2004 11:15
An: [EMAIL PROTECTED]
Betreff: AW: currency formatting: Euro

I am using POI 2.5 without any problem here. And it is quite a big
project with a lot of reports generated in Excel. 
The bugs I found are in both 2.0 and 2.5 and are not related to your
problem :-)
As I told you before I never used it with formats and number cells. I
always used it with String cells. I fetch a format String from a
property file, fill in the data via MessageFormat and the resulting
String is written in the Workbook. Works even with a "€" instead of
"\u20ac" although I feel more comfortable with it. If it does not work
it might be considered a bug.

Did you already post a piece of code? I think this is always very
helpful.

bye Björn

> -----Ursprüngliche Nachricht-----
> Von: KHZ (SAW) [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 23. Juni 2004 11:03
> An: Mehner, Björn
> Betreff: AW: currency formatting: Euro
> 
> 
> Hi Björn.
> 
> I'm using POI 2.0. setEncoding() alone and plus replacing "€" be
> "\u20ac" didn't work. The result is still the same.
> 
> What POI version do you use? For this small project just needed for
> comparisons I could use any POI version where it just runs.
> 
> Version 2.0 is the version which we always used not having 
> big problems.
> 
> Thanks and regards,
> 
> Karl-Heinz.
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Mehner, Bj?rn [mailto:[EMAIL PROTECTED] 
> Gesendet: Mittwoch, 23. Juni 2004 09:19
> An: POI Users List; [EMAIL PROTECTED]
> Betreff: AW: currency formatting: Euro
> 
> Did you try the unicode representation of the €? it is 
> "\u20ac". But be
> aware! If I recall right it is a 16bit Unicode character and  
> Excel uses
> only 8bit on default. So you have to set the encoding via
> cell.setEncoding(HSSFCell.ENCODING_UTF_16). Maybe the last 
> step already
> does the trick without using "\u20ac"
> 
> But I do not know if this solves your problem with formulas/formats. I
> only tried this with normal cell content.
> 
> ciao Bodo
> 
> PS: Feedback if it worked will be welcome.
> 
> > -----Ursprüngliche Nachricht-----
> > Von: KHZ (SAW) [mailto:[EMAIL PROTECTED]
> > Gesendet: Dienstag, 22. Juni 2004 16:52
> > An: 'POI Users List'; [EMAIL PROTECTED]
> > Betreff: AW: currency formatting: Euro
> > 
> > 
> > Hi world.
> > 
> > It's possible to select various Euro currency formatting symbols (or
> > however it's named.
> > 
> > I've tested it with several variants, e.g. "#,##0 [$€-1]" 
> or also with
> > -407 instead of -1 or even just $ without all that bracketing. It's
> > always the same. I see the negation symbol of formal logic 
> (a > turned
> > 45° to the left).
> > 
> > What's going wrong? Isn't the Euro symbol supported by POI? All
> > notations lead to the same result. But these format strings 
> are shown
> > when recording Excel macros and don't lead to errors if 
> > they're applied
> > in POI.
> > 
> > Regards,    Karl-Heinz.
> > 
> > 
> > -----Ursprüngliche Nachricht-----
> > Von: KHZ (SAW) [mailto:[EMAIL PROTECTED] 
> > Gesendet: Dienstag, 22. Juni 2004 15:09
> > An: [EMAIL PROTECTED]
> > Betreff: currency formatting: Euro
> > 
> > Hi world.
> >  
> > How do I obtain the Euro symbol?
> >  
> > The first trial was
> >       oCS.setDataFormat(oFmt.getFormat("#,##0 $"));
> >  
> > That format string is the string written in the Excel macros when I
> > record them. I wondered why there is “$” when I see “€”.
> >  
> > So the next trial was "#,##0 €". But that brings the 
> negation sign of
> > formal logic (similar to –i; but just one digit).
> >  
> > So how will I be successful to see € (Euro).
> >  
> > Regards,    Karl-Heinz.
> >  
> >  
> >  
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> 
> 

Attachment: EuroAdapt.java
Description: java/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to