apps-script-utils 2.1.1 Help

parseA1Notation

function parseA1Notation(a1Notation: string): GridRange;

The result carries the sheet name when the notation had one and null when it did not, the range part on its own, and the four zero-based bounds the Sheets API works in.

Open notations are understood: "A:A" is a whole column and leaves the row bounds out, "1:1" a whole row.

Parameters

Parameter

Type

Description

a1Notation

string

The notation to read, with or without a sheet name.

Returns

GridRange — the parsed range.

Examples

Reading A1 notation

parseA1Notation("Sheet1!A1:B2"); // => { sheetName: "Sheet1", a1Notation: "A1:B2", // startRowIndex: 0, endRowIndex: 2, startColumnIndex: 0, endColumnIndex: 2 } parseA1Notation("A1").sheetName; // => null

See also

Source

src/appsscript/sheet/parseA1Notation.ts

23 September 2026

This documentation was generated with AI (Claude) from the library's source code.