[This change is soon to be released]
Quadratic is transitioning from using x,y coordinates to A1 notation and removing negative and zero-indexed coordinates. Existing sheets are automatically migrated to this new format.
Docs for thorough explanation of how these changes work:
Python references
JavaScript references
Summary of changes
- Switching from (x, y) to A1
- Now you use
q.cells('A1')
instead ofcells(0,0)
- Now you use
- Removing negative indices
- No more (-1, -5) coordinates
- Removing zero-indexed coordinates
- No more (0,0) coordinates
- Coordinates start at A on the x-axis and 1 on the y-axis now
Your existing sheets will automatically upgrade to this new paradigm when you open them, which will include the following changes:
- Any cells occupying negative space will shift inside the new bounds
- All cell references will update to A1 notation
- Any cells in the 0 row or column will shift to row/column 1
Coordinates now run from A to infinity along the x-axis and 1 to infinity along the y-axis.
Code language cell references
In the past, to reference cells from code, you would use:
cells((x1,y1),(x2,y2))
For example, to reference cells from columns 1 to 4 and rows 1 to 9, you would do:
cells((1,1),(4,9))
With A1 notation, that reference is performed using the new keyword q.cells()
, where 0,0
to 4,9
is referenced as q.cells('A1:D9')
.
A1 notation enables some really powerful functionality. For example, you can reference all cells with values in a column by using q.cells('A')
or all cells from multiple columns with q.cells('A:C')
.
Breaking changes
If you were using variables inside of your cells() functions, that cannot be automatically shifted.
e.g.
x = 1
y = 2
cells(x,y)
Will not be automatically shifted since the reference uses variables. ^
If your sheet is broken and you need help fixing, please reply to this thread for help or reach out to us directly: Contact us | Quadratic
More information
For more in-depth instructions on how to use A1 notation in code, you can visit the docs:
Python references
JavaScript references