The number appears rounded, but I don't think that the spreadsheet actually loses precision. POI 1.5.1 does not have the ability to add formats, AFAIK.
Try a newer build. > -----Original Message----- > From: Janarthan S [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 9:00 AM > To: [EMAIL PROTECTED] > Subject: Very Urgent.. > > > 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 > > Disclaimer: This e-mail may contain confidential and privileged material for the sole use of the intended recipient(s). If you are not the intended recipient (or authorized to receive this e-mail for the recipient), please note that review, use, distribution or disclosure of any part of this e-mail is strictly prohibited, except that you should please contact the sender or notify Kiodex, Inc. at [EMAIL PROTECTED] that you have received this message in error, and delete all copies of the message. This e-mail and any attachments hereto are the property of Kiodex, Inc. and/or its relevant affiliate, and are not intended to be an offer or an acceptance, and do not create or evidence a binding and enforceable contract between Kiodex, Inc. or any of its affiliates and the intended recipient or any other party, and may not be relied on by anyone as the basis of a contract by estoppel or otherwise. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
