I have a scenario where i have a UDF in Python, and exposed it to excel. Lets say that UDF (random number generation) is called in cell A1
in Cell A2 i am doing a calculation based on A1 i.e. Cell A2 would be "=A1+1"
Now, i want the value of cell A2 to be captured by the python. So i defined another UDF which takes cell as input argument.
@xl_func("xl_cell cell: float", macro=True, volatile=True)
# doing something with cell value.
and i am calling this new function in another cell, lets say A3 as '=Output(A2)'
Now, the problem is that in the output function the cell.value is returning the old value of the cell A2 and not the new one.
To illustrate more clearly:
1st Set of values:
2nd Set: (Doing F9)
3rd Set:(Doing F9)
The highlighted values shows that the Previous value of A2 is captured in this iteration of A3.
can someone please help me how to avoid this and capture the value of a cell, which involves a formula .