xlcalculator icon indicating copy to clipboard operation
xlcalculator copied to clipboard

Is it possible to pass a range to xlcalculator

Open am4321 opened this issue 3 years ago • 3 comments

Is it possible to pass an array or list to a named range or any cell with the values being filled in vertically? I do understand that we can loop over the list and set the cells one at a time. set_cell_value(NamedRange1, list1) Or maybe pass a dataframe to a named range.

am4321 avatar Apr 22 '22 07:04 am4321

It's been a while since I've tried, and I'm not jear a computer for at least a day, but I recall we can do that.

Check out the tests. If we can still do it, the test should still be there.

bradbase avatar Apr 22 '22 08:04 bradbase

This is what I had in mind...

https://stackoverflow.com/questions/23350581/openpyxl-1-8-5-reading-the-result-of-a-formula-typed-in-a-cell-using-openpyxl

bradbase avatar Apr 22 '22 08:04 bradbase

I was wondering if instead of passing an input_dict as in the example above, if it would be possible to pass a Named Range. My use case if for financial calculations and I need to pass a set of cashflows either 1 set or multiple sets as time/cashflows. The results can also return either as a single value or as a range. Since the number of values in a cashflow is not fixed, it would be good to be able to pass ranges. Thanks again for the awesome module.

am4321 avatar Aug 31 '22 20:08 am4321