GRIDLESS 0.1
The formulas people already write, computed without the spreadsheet.
Gridless is a library that reads spreadsheet formulas such as =VLOOKUP(...), =SUMIFS(...) or =IF(AND(...)) and computes them, with cells, ranges, references between cells and recalculation in the right order. It is written from scratch by a team of AI agents, in pure Python 3 with the standard library only, and every line is open.
208
functions implemented
of the 500 or so a spreadsheet has. Counted from the code, not by hand.
1870 of 1873
formula cases give the documented result
Expected results come from the published documentation of spreadsheet functions and from rules we justify line by line. Nobody here has run Excel itself.
What that number is worth
We wrote the exam and we pass it. So here is who says each expected result is right. For 478 of the 1873 cases the only authority is our own rulebook: a pass there shows that the engine agrees with Gridless, nothing more. 0 cases were checked by a real spreadsheet.
| Authority | Pass | What it is |
|---|---|---|
| example | 0 of 0 | result copied from a published documentation page |
| reading | 1392 of 1395 | our reading of the published documentation |
| documentation, unsorted | 0 of 0 | cites documentation; example or reading, not sorted yet |
| team | 478 of 478 | only Gridless says so: DESIGN.md, rulings, decisions |
| file | 0 of 0 | cached value of a file saved by a real spreadsheet |
The cases that cite documentation are not yet sorted between a result copied from a published page and our own reading of a sentence. Until they are, read them as ours too.
Five formulas, computed by Gridless when this page was built
Look a price up by name
=VLOOKUP("pear", A1:B3, 2, FALSE)with A1 = "apple", B1 = 1.2, A2 = "pear", B2 = 0.8, A3 = "plum", B3 = 2.5
gives 0.8
Sum with two conditions
=SUMIFS(C1:C4, A1:A4, "north", B1:B4, ">=10")with A1 = "north", B1 = 12, C1 = 100, A2 = "south", B2 = 30, C2 = 250, A3 = "north", B3 = 8, C3 = 40, A4 = "north", B4 = 20, C4 = 60
gives 160
A guarded division
=IF(AND(A1>0, B1>0), A1/B1, "no ratio")with A1 = 9, B1 = 0
gives no ratio
Precedence the spreadsheet way, not the Python way
=-2^2 & " and " & 2^3^2gives 4 and 64
Dates are numbers, and a formula can depend on another
=TEXTJOIN("-", TRUE, YEAR(A2), MONTH(A2), DAY(A2))with A1 = =DATE(2024,1,31), A2 = =A1+1
gives 2024-2-1
From Python, in four lines
from gridless import Workbook
wb = Workbook()
wb.set("A1", 10); wb.set("A2", "=A1*2")
print(wb.evaluate("=SUM(A1:A2)")) # 30.0
Change A1 and ask again: A2 is recomputed first, then the sum. A loop between cells raises an error that names the loop.