vinci1it2000 / formulas

Excel formulas interpreter in Python.
https://formulas.readthedocs.io/
European Union Public License 1.1
358 stars 75 forks source link

excel cell names/alias are identified as loops #130

Open dberardo-com opened 7 months ago

dberardo-com commented 7 months ago

i am trying to detect and remove all loops from an excel graph, an i am using this code to achieve that:

from formulas.excel.cycle import simple_cycles
list(simple_cycles(xl_model.dsp.dmap.succ))

however, it turns out the all excel cell names are seens as loop. example in this simple sheet i have got one actual loop (C1 <-> B2) and a cell alias on A3:

image

this is the output of the code above:

image

dberardo-com commented 7 months ago

btw on a related matter: is there any method to remove or update cells in a dsp once it has been loaded ? (in this case i would like to remove the loop for example, by removing one of the 2 cells causing it)