Return-Path: Delivered-To: apmail-jakarta-poi-user-archive@www.apache.org Received: (qmail 81108 invoked from network); 13 Jan 2005 14:49:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Jan 2005 14:49:55 -0000 Received: (qmail 54839 invoked by uid 500); 13 Jan 2005 14:49:50 -0000 Delivered-To: apmail-jakarta-poi-user-archive@jakarta.apache.org Received: (qmail 54805 invoked by uid 500); 13 Jan 2005 14:49:49 -0000 Mailing-List: contact poi-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "POI Users List" Reply-To: "POI Users List" Delivered-To: mailing list poi-user@jakarta.apache.org Received: (qmail 54789 invoked by uid 99); 13 Jan 2005 14:49:49 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from mlnya401er.ml.com (HELO mlnya401er.ml.com) (199.43.38.99) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 13 Jan 2005 06:49:47 -0800 Received: from MLNYA356BH.amrs.win.ml.com (unknown [146.125.98.6]) by mlnya401er.ml.com (Postfix) with ESMTP id 8660C1403C735; Thu, 13 Jan 2005 09:49:45 -0500 (EST) Received: from mlnyb802bh.amrs.win.ml.com ([146.125.97.61]) by MLNYA356BH.amrs.win.ml.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 13 Jan 2005 09:48:53 -0500 Received: from mlnyb707mb.amrs.win.ml.com ([146.125.92.7]) by mlnyb802bh.amrs.win.ml.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 13 Jan 2005 09:48:53 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Reading value from formula cell Date: Thu, 13 Jan 2005 09:48:52 -0500 Message-ID: <6BCB72ACFE6B1644AE91E59B39E2FF5D07E9A034@mlnyb707mb.amrs.win.ml.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Reading value from formula cell Thread-Index: AcT5WEUE/EXI+dhfRiq3FGA7U5zoqQAJfGyg From: "Kashikar, Yogita (SSD Technology) " To: "POI Users List" , X-OriginalArrivalTime: 13 Jan 2005 14:48:53.0389 (UTC) FILETIME=[0044D3D0:01C4F97F] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N No macros are processed when closing the excel file. Any other pointers = ??? Thanks, Yogita. -----Original Message----- From: KHZ (SAW) [mailto:karl-heinz.zengerle@sawag.com]=20 Sent: Thursday, January 13, 2005 5:11 AM To: 'POI Users List' Subject: AW: Reading value from formula cell Hi Yogita. Can you deny that any macros are processed when closing the Excel file? Regards, Karl-Heinz. -----Urspr=FCngliche Nachricht----- Von: Kashikar, Yogita (SSD Technology) [mailto:Yogita_Kashikar@ml.com]=20 Gesendet: Mittwoch, 12. Januar 2005 23:53 An: POI Users List Betreff: RE: Reading value from formula cell I understand that POI doesn't evaluate the formula and Excel does it. This is what I am doing: -I am creating a spreadsheet. -Writing a formula cell. -Saving the file to disk - then opening it manually. I can see the correct results in the formula cell. I close it. - then I open the same file in java program using poi - read the formula cell using getNumericCellValue It returns me the value 0.0. Should it not retun me the calculated value ? Is it a bug in POI ? Is there any alternate solution to do this ? We are sort of stuck on this. Would appriciate any quick response. Thanks, Yogita. -----Original Message----- From: Kashikar, Yogita (SSD Technology)=20 Sent: Wednesday, January 12, 2005 3:23 PM To: POI Users List Subject: RE: Reading value from formula cell Hi Tony, Thanks for your reply. I am creating the spread sheet and creating a cell as stated in previous message. As a second step( after creating the spread sheet and saving in excel file) I am opening the excel file and re-reading the formula cell. This read is always returning me 0.0. What could be the problem with this ? Is teher any alternate way to read value from formula cell. Thanks, Yogita. -----Original Message----- From: Tony Nelson [mailto:tnelson@starpoint.com]=20 Sent: Wednesday, January 12, 2005 3:17 PM To: POI Users List Subject: Re: Reading value from formula cell Quoting Yogita : > Hi, >=20 > I am facing difficulties while reading formula cell values with POI version=20 > 2.5. >=20 > I have created formula cell as follows: > cell.setCellType(HSSFCell.CELL_TYPE_FORMULA); > cell.setCellFormula("SUM(D8..F8)"); >=20 > And I am reading it as follow: > double formulaCellValue =3D row.getCell((short) 7).getNumericCellValue(); >=20 > When read this way(using getNumericCellValue()), I am always getting the > value=20 > of 0.0.=20 >=20 > Any quick help in this regard would be highly appriciated. >=20 POI does not evaluate formulas. Excel does that. POI simply puts the forumla in the cell. In order to get a value, you would have to create the spreadsheet, open it in excel, and then re-read it with POI. This was discussed in detail less than two weeks ago on the list. Please read the archives. This email message from Starpoint Solutions LLC is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Opinions, conclusions and other information in this message that do not relate to the official business of Starpoint Solutions shall be understood as neither given nor endorsed by it. -------------------------------------------------------- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/ -------------------------------------------------------- --------------------------------------------------------------------- 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/ --------------------------------------------------------------------- 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/ --------------------------------------------------------------------- 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/ --------------------------------------------------------------------- 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/