Hi,

I am using POI 1.5.1 to create an excel spreadsheet.
In my generated Sheet, i have to display a number like 2.345. (Rounding from 
2.342325663323 to 2.345)
Currently, i am using HSSFDataFormat.getFormat("(#,##0.00);(#,##0.00)"), but this 
rounds up the result to 2.34.
Reading the docs, i found that there is format, which rounds a number(say from 
2.3236512635 to 2.320). Is there any way to acheive this functionality ?

I also went through the code for HSSFDataFormat. This adds the formats to an 
arrayList. I tried to insert one more format in to it by the following statement - 
        formats.add(0x32, "(#,##0.000);(#,##0.000)");
I compiled the class, updated the jar and had a run. But the program resulted in an 
error.

Is there any other way to get through this problem ? I am really Stuck. My delivery is 
due.

Please Help.

Regards,
Janarthan S 

Reply via email to