Let me repeat back my understanding of your problem.
You have a function.
The value that the function will return changes over time based on some
external cause.
You want the function to track every cell that calls the function and
then update the value in the cell that called the function.
********************
Well, you can not simply write a new value into the cell, because that
will overwrite the formula that caused your function to be called.
instead, you need to cause the cell to call the function again.
Gianpiero Napoli wrote:
Hi Eike,
I need the position to update the cell.
Let say that I have a thread that get some data from somewhere
(socket/file/etc...) and I have a function TakeMyData(int Id).
I want to updtate this cell (the caller) every time i have a new data sample.
So I need:
- to store the position of the cell somewhere.
- every time I get a new data with Identifier == id i want to update
this cell maybe calline
xSpreadsheet.getCellByPosition(positionStored).setFormun("TakeMyData(id)");
so I have two different issues: get the position of the caller cell
and force the update of the cell, in other words force the computation
of the TakeMyData function.
Can you help me?
Thanks a lot,
Gianpiero
On Sat, Jan 31, 2009 at 1:02 PM, Eike Rathke <[email protected]> wrote:
Hi,
On Wednesday, 2009-01-28 10:08:21 +0100, Daniel Rentz wrote:
I want to know the name or the position of the cell that has called this
function. Is it possibile? How I can do that?
It is not possible, because there may not be a caller cell. Caller of a
function could be:
- a cell formula
- a matrix formula (based on a cell range)
- a defined name (a.k.a. named range)
- a condition of a conditional formatting
- and in the near/far future also the condition of a data validation.
All these formula expressions, at the time of being interpreted, do have
some cell position associated though. However, the Add-In interface
doesn't pass a position, and I'm not sure it should.
Gianpiero, what would you need the cell position for?
Eike
--
PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication.
Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info: http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]