Return-Path: Delivered-To: apmail-jakarta-poi-user-archive@www.apache.org Received: (qmail 17672 invoked from network); 15 Jul 2004 13:25:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 15 Jul 2004 13:25:53 -0000 Received: (qmail 42189 invoked by uid 500); 15 Jul 2004 13:25:49 -0000 Delivered-To: apmail-jakarta-poi-user-archive@jakarta.apache.org Received: (qmail 42171 invoked by uid 500); 15 Jul 2004 13:25:48 -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 42157 invoked by uid 99); 15 Jul 2004 13:25:48 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [144.177.0.11] (HELO kcpgb-mime03.akerkvaerner.com) (144.177.0.11) by apache.org (qpsmtpd/0.27.1) with ESMTP; Thu, 15 Jul 2004 06:25:46 -0700 Received: from gb-d02.gb.enterdir.com ([144.176.195.79]) by kcpgb-mime03 with InterScan Messaging Security Suite; Thu, 15 Jul 2004 14:25:17 +0100 Received: from gb-d04.gb.enterdir.com ([144.176.195.77]) by gb-d02.gb.enterdir.com with Microsoft SMTPSVC(5.0.2195.6713); Thu, 15 Jul 2004 14:25:24 +0100 content-class: urn:content-classes:message Subject: RE: Formulas contained in a spreadsheet Add-In Date: Thu, 15 Jul 2004 14:25:24 +0100 Message-ID: <3199DA537D77D51193FD0008C7A4337D02876C7F@kcpkin-msx01.messaging.kvaerner.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MS-Has-Attach: X-MS-TNEF-Correlator: X-MimeOLE: Produced By Microsoft Exchange V6.0.6556.0 Thread-Topic: Formulas contained in a spreadsheet Add-In Thread-Index: AcRpqxQxCr+bMhdMT2ilQPHqTrva7gApBMRw From: To: X-OriginalArrivalTime: 15 Jul 2004 13:25:24.0661 (UTC) FILETIME=[2FA71650:01C46A6F] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Avik, Thanks for replying. I hope this is more clear. When using setCellFormula and passing an Excel user defined function to it= (in this case a user defined function called DirExists) this is what I= get: =3DA7()?DIREXISTS is what I see in the formula bar in Excel. The cell= displays #REF!. The DirExists formula is a user defined formula. That is, it is listed in= Excel in the 'User defined' function category in Excel's 'Paste Function= Wizard'. The DirExists formula is in an Excel Add-In (xla file). Note that I am only= using DirExists as an example, the contents of the cell in Excel resulting= from the c.setCellFormula method are not peculiar to this particular user= defined function. Clive -----Original Message----- From: Avik Sengupta [mailto:avik.sengupta@itellix.com] Sent: 14 July 2004 14:59 To: POI Users List Subject: Re: Formulas contained in a spreadsheet Add-In Where do you get the string "=3DA7()?DIREXISTS" ?? If it is from one of POI's viewers, then well, actually that is how formulas are stored in xls files, in Reverse Polish Notation. However, if this is how you see it in excel, its obviously wrong. I believe user defined functions in the workbook should work, but dunno about add in functions. =0D Not saying your bug report is necessarily wrong, but cant understand it.. you need to be clearer in what you are doing and what you are seeing...=0D On Thu, 2004-07-08 at 21:48, Clive.Janes@akerkvaerner.com wrote: > Anybody know how to write, to a cell, a formula that is contained in a= Excel spreadsheet add-in? >=0D > I have tried cell.setCellFormula(formulaString), but this writes the= formula to the cell incorrectly. >=0D > For example: > cell.setFormula("DirExists(A7)") gets written to the cell as = =3DA7()?DIREXISTS, which obviously does not work. >=0D > I have had a squint through the POI javadoc but can't see anything. > Any help would be very welcome. >=0D > Thanks > Clive Janes >=0D > This e-mail and any attachment are confidential and may be privileged or= otherwise protected from disclosure. It is solely intended for the= person(s) named above. If you are not the intended recipient, any reading,= use, disclosure, copying or distribution of all or parts of this e-mail or= associated attachments is strictly prohibited. If you are not an intended= recipient, please notify the sender immediately by replying to this= message or by telephone and delete this e-mail and any attachments= permanently from your system. >=0D > --------------------------------------------------------------------- > To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: poi-user-help@jakarta.apache.org >=0D --------------------------------------------------------------------- To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: poi-user-help@jakarta.apache.org This e-mail and any attachment are confidential and may be privileged or= otherwise protected from disclosure. It is solely intended for the= person(s) named above. If you are not the intended recipient, any reading,= use, disclosure, copying or distribution of all or parts of this e-mail or= associated attachments is strictly prohibited. If you are not an intended= recipient, please notify the sender immediately by replying to this= message or by telephone and delete this e-mail and any attachments= permanently from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: poi-user-help@jakarta.apache.org