logoalt Hacker News

paulfitz • today at 3:50 PM • 2 replies • view on HN

It is straight Python. Yes the spreadsheet habit of making functions SHOUT does look weird mixed in with Python syntax.

PREVIOUS returns a record, then .Running_Balance pulls out one field of it.


Replies

chii • today at 3:58 PM

That's what makes it clunky. Returning a record is OK, but then a record is basically what spreadsheets are (ala, a table). Except records are named columns in a spreadsheet, and accessing it using a dot syntax looks out of place imho.

I reckon it makes more sense to return a table, and then have an index lookup in that table: e.g., index(PREVIOUS(blah_blah), column). Then you can also use an indirection to choose which column from another cell if desired.

This is how google finance in sheets returns some data (like exchange rates, iirc).

whizzter • today at 3:53 PM

What parts are Python and how does one know where the classic Spreadsheet functionality ends and Python starts ?

➕ show 2 replies