poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Clive.Ja...@akerkvaerner.com>
Subject RE: Formulas contained in a spreadsheet Add-In
Date Thu, 15 Jul 2004 13:25:24 GMT

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:

=A7()?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 "=A7()?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. 

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...

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?
>
> I have tried cell.setCellFormula(formulaString), but this writes the formula to the cell
incorrectly.
>
> For example:
> 	cell.setFormula("DirExists(A7)") gets written to the cell as =A7()?DIREXISTS, which
obviously does not work.
>
> I have had a squint through the POI javadoc but can't see anything.
> Any help would be very welcome.
>
> Thanks
> Clive Janes
>
> 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
>


---------------------------------------------------------------------
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


Mime
View raw message