back

by dosinga·3y ago·view on hn ↗
You can access stuff in a different way of course. Each sheet is also a python object, so you can just go Sheet1[20, 20] or Sheet1[10:20] if you like that way better
2 comments
I suppose that means you can reference eg the cell "above" by doing some kind of self+/-offset?

For what I mean see: https://excelchamps.com/formulas/r1c1/

Sheet1[10:20] looks like the list slicing syntax. Are there any issues there?
You are correct, that is the slicing syntax. We to carefully interpret the ":" in the right way. For example:

sort(l, lambda A:F1(A)) doesn't invoke

Sheet1[10:20] just returns the 10 to 20s row of that sheet, which I think is the most reasonable thing to do here

I assume you mean rows 11 to 20 like the Python syntax would do or is it different because spreadsheet row numbers start at 1 instead of 0?
Ah, yes, sorry, just Python based slicing. It follows the numpy rules