apps-script-utils 2.1.1 Help

extractSheetNameFromA1Notation

function extractSheetNameFromA1Notation(a1Notation: string): string | null;

The quoting Sheets uses for names with spaces or punctuation is undone, so "'My Sheet'!A1" yields My Sheet. A notation without a sheet name yields nothing.

Parameters

Parameter

Type

Description

a1Notation

string

The notation to read.

Returns

string | null — the sheet name, when the notation carries one.

Examples

Extracting

extractSheetNameFromA1Notation("Sheet1!A1:B2"); // => "Sheet1"

See also

Source

src/appsscript/sheet/extractSheetNameFromA1Notation.ts

23 September 2026

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