Class DeveloperMetadataLocation
Stay organized with collections
Save and categorize content based on your preferences.
DeveloperMetadataLocation
Access developer metadata location information.
Detailed documentation
getColumn()
Returns the Range
for the column location of this metadata, or null
if the
location type is not DeveloperMetadataLocationType.COLUMN
.
Return
Range
— The Range
for the column location of this metadata, or null
if the
location type is not DeveloperMetadataLocationType.COLUMN
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getLocationType()
Gets the type of location.
Return
DeveloperMetadataLocationType
— The location type.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getRow()
Returns the Range
for the row location of this metadata, or null
if the
location type is not DeveloperMetadataLocationType.ROW
.
Return
Range
— The Range
for the row location of this metadata, or null
if the
location type is not DeveloperMetadataLocationType.ROW
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getSheet()
Returns the Sheet
location of this metadata, or null
if the location type is
not DeveloperMetadataLocationType.SHEET
.
Return
Sheet
— The Sheet
location of this metadata, or null
if the location type is
not DeveloperMetadataLocationType.SHEET
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
getSpreadsheet()
Returns the Spreadsheet
location of this metadata, or null
if the location
type is not DeveloperMetadataLocationType.SPREADSHEET
.
Return
Spreadsheet
— The Spreadsheet
location of this metadata, or null
if the location
type is not DeveloperMetadataLocationType.SPREADSHEET
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-03 UTC.
[null,null,["Last updated 2024-12-03 UTC."],[[["\u003cp\u003e\u003ccode\u003eDeveloperMetadataLocation\u003c/code\u003e provides access to information about the location of developer metadata within a spreadsheet.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods to retrieve the location type, which can be a spreadsheet, sheet, row, or column.\u003c/p\u003e\n"],["\u003cp\u003eYou can get the specific Spreadsheet, Sheet, or Range associated with the metadata, depending on its location type.\u003c/p\u003e\n"],["\u003cp\u003eAll methods require authorization with either \u003ccode\u003ehttps://www.googleapis.com/auth/spreadsheets.currentonly\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/spreadsheets\u003c/code\u003e scopes.\u003c/p\u003e\n"]]],[],null,["# Class DeveloperMetadataLocation\n\nDeveloperMetadataLocation\n\nAccess developer metadata location information. \n\n### Methods\n\n| Method | Return type | Brief description |\n|-----------------------------------------|------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [getColumn()](#getColumn()) | [Range](/apps-script/reference/spreadsheet/range) | Returns the [Range](/apps-script/reference/spreadsheet/range) for the column location of this metadata, or `null` if the location type is not `Developer``Metadata``Location``Type.COLUMN`. |\n| [getLocationType()](#getLocationType()) | [DeveloperMetadataLocationType](/apps-script/reference/spreadsheet/developer-metadata-location-type) | Gets the type of location. |\n| [getRow()](#getRow()) | [Range](/apps-script/reference/spreadsheet/range) | Returns the [Range](/apps-script/reference/spreadsheet/range) for the row location of this metadata, or `null` if the location type is not `Developer``Metadata``Location``Type.ROW`. |\n| [getSheet()](#getSheet()) | [Sheet](/apps-script/reference/spreadsheet/sheet) | Returns the [Sheet](/apps-script/reference/spreadsheet/sheet) location of this metadata, or `null` if the location type is not `Developer``Metadata``Location``Type.SHEET`. |\n| [getSpreadsheet()](#getSpreadsheet()) | [Spreadsheet](/apps-script/reference/spreadsheet/spreadsheet) | Returns the [Spreadsheet](/apps-script/reference/spreadsheet/spreadsheet) location of this metadata, or `null` if the location type is not `Developer``Metadata``Location``Type.SPREADSHEET`. |\n\nDetailed documentation\n----------------------\n\n### `get``Column()`\n\nReturns the [Range](/apps-script/reference/spreadsheet/range) for the column location of this metadata, or `null` if the\nlocation type is not `Developer``Metadata``Location``Type.COLUMN`.\n\n#### Return\n\n\n[Range](/apps-script/reference/spreadsheet/range) --- The [Range](/apps-script/reference/spreadsheet/range) for the column location of this metadata, or `null` if the\nlocation type is not `Developer``Metadata``Location``Type.COLUMN`.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n### `get``Location``Type()`\n\nGets the type of location.\n\n#### Return\n\n\n[DeveloperMetadataLocationType](/apps-script/reference/spreadsheet/developer-metadata-location-type) --- The location type.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n### `get``Row()`\n\nReturns the [Range](/apps-script/reference/spreadsheet/range) for the row location of this metadata, or `null` if the\nlocation type is not `Developer``Metadata``Location``Type.ROW`.\n\n#### Return\n\n\n[Range](/apps-script/reference/spreadsheet/range) --- The [Range](/apps-script/reference/spreadsheet/range) for the row location of this metadata, or `null` if the\nlocation type is not `Developer``Metadata``Location``Type.ROW`.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n### `get``Sheet()`\n\nReturns the [Sheet](/apps-script/reference/spreadsheet/sheet) location of this metadata, or `null` if the location type is\nnot `Developer``Metadata``Location``Type.SHEET`.\n\n#### Return\n\n\n[Sheet](/apps-script/reference/spreadsheet/sheet) --- The [Sheet](/apps-script/reference/spreadsheet/sheet) location of this metadata, or `null` if the location type is\nnot `Developer``Metadata``Location``Type.SHEET`.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`\n\n*** ** * ** ***\n\n### `get``Spreadsheet()`\n\nReturns the [Spreadsheet](/apps-script/reference/spreadsheet/spreadsheet) location of this metadata, or `null` if the location\ntype is not `Developer``Metadata``Location``Type.SPREADSHEET`.\n\n#### Return\n\n\n[Spreadsheet](/apps-script/reference/spreadsheet/spreadsheet) --- The [Spreadsheet](/apps-script/reference/spreadsheet/spreadsheet) location of this metadata, or `null` if the location\ntype is not `Developer``Metadata``Location``Type.SPREADSHEET`.\n\n#### Authorization\n\nScripts that use this method require authorization with one or more of the following [scopes](/apps-script/concepts/scopes#setting_explicit_scopes):\n\n- `https://www.googleapis.com/auth/spreadsheets.currentonly`\n- `https://www.googleapis.com/auth/spreadsheets`"]]