koala icon indicating copy to clipboard operation
koala copied to clipboard

setting namedcell does not work correctly

Open GliderGeek opened this issue 8 years ago • 3 comments

sample code:

cwd = os.getcwd()
spreadsheet_path = os.path.join(cwd, 'template.xlsx')
graph = ExcelCompiler(spreadsheet_path).gen_graph()
graph.set_value('input1', 3)  # cell A1
result = graph.evaluate('Blad1!B1')  # =A1+5
# result=5 instead of 8

template.xlsx

GliderGeek avatar Oct 26 '17 21:10 GliderGeek

I think this is because you generated teh graph while A1 is empty and thus the graph has only one node. Try to assign a value in your worksheet before generating the graph.

vallettea avatar Oct 27 '17 06:10 vallettea

i don't think that is the case, because it does work when normal coordinates are used. it would also be a lot nicer when the original graph can be re-used. i think that i have found the problem in the code, will publish it here later

GliderGeek avatar Oct 27 '17 08:10 GliderGeek

I have been using named cells and they appear to be working properly.

has this been fixed?

Brad-eki avatar Apr 03 '19 08:04 Brad-eki