๐ฐA1 notation
GAS โฉ Classes โฉ Range โฉ A1 notation
่ฉฆ็ฎ่กจ็ใๆฌไฝ็ทจ่ใๆก็จไธ็จฎๅพ็นๆฎ็ใๆธๅญ็ณป็ตฑใ๏ผ
A = 1, B = 2, ... , Z = 26ใ
ๆฒๆใ0ใ้ๅ็ฌฆ่๏ผไน็กๆณ่กจ็คบ 0 ้ๅๆธๅญใ
ไพๅฆ๏ผ26 ๅช่ฝ็จ Z ่กจ็คบ๏ผไธ่ฝ็จ A0 ่กจ็คบใ
ABC = 1*26^2 + 2*26 + 3 // ่ฝๆ็บ 10 ้ฒไฝ
Z + A = AA // = 26 + 1 = AA
ZZ + A = AAA // = 26ยฒ + 26 + 1 = AAA
Sheet1!A1:B2 # first two cells in top two rows of `Sheet1`
Sheet1!A:A # first column of `Sheet1`
Sheet1!1:2 # first two rows of `Sheet1`
Sheet1!A5:A # first column (from row 5 onward)
A1:B2 # first two cells in top two rows
Sheet1 # all the cells in `Sheet1`
'My Custom Sheet'!A:A # first column of sheet named "My Custom Sheet"
'My Custom Sheet' # all the cells in "My Custom Sheet"
๐กTip:
where possible, use distinct names for the objects within your spreadsheets. For example, A1 refers to the cell A1 in the first visible sheet, whereas 'A1' refers to all the cells in a sheet named A1. Similarly, Sheet1 refers to all the cells in Sheet1. However, if thereโs a named range titled "Sheet1", then Sheet1 refers to the named range and 'Sheet1' refers to the sheet.
single quotes are required for sheet names with spaces, special characters, or an alphanumeric combination.
columnName() - column index to column name.
A1Notation() -
(row, col)
to A1 Notation.A1NotationToRowColumn() - A1 notation to
{ row, col }
.
Google Sheets API Overview โฉ Cell โฉ A1 notation
Cells - internal data structure of a cell
Range โฉ
getA1Notation() - ๅๅณ้กไผผ
"A1:E2"
็ๅญไธฒใSheet โฉ getRangeList(a1Notations)
็ธ้่ฉฆ็ฎ่กจๆไปค๏ผ
=ADDRESS() - row/col number to A1/R1C1 notation.
=ROW() - row number of a cell.
=COLUMN() - column number of a cell.
Last updated
Was this helpful?