Class DeveloperMetadataLocation Stay organized with collections Save and categorize content based on your preferences.
Page Summary
The DeveloperMetadataLocation class provides access to information about the location of developer metadata within a spreadsheet.
You can retrieve the location type of the metadata using the
getLocationType()method.Methods like
getColumn(),getRow(),getSheet(), andgetSpreadsheet()return the specific location (Range, Sheet, or Spreadsheet) based on the metadata's location type, ornullif it doesn't match.Accessing developer metadata location information typically requires authorization with spreadsheet-related scopes.
Access developer metadata location information.
Methods
| Method | Return type | Brief description |
|---|---|---|
get | Range|null | Returns theRange for the column location of this metadata, ornull if thelocation type is notDeveloper. |
get | Developer | Gets the type of location. |
get | Range|null | Returns theRange for the row location of this metadata, ornull if thelocation type is notDeveloper. |
get | Sheet|null | Returns theSheet location of this metadata, ornull if the location type isnotDeveloper. |
get | Spreadsheet|null | Returns theSpreadsheet location of this metadata, ornull if the locationtype is notDeveloper. |
Detailed documentation
getColumn()
Returns theRange for the column location of this metadata, ornull if thelocation type is notDeveloper.
Return
Range|null — TheRange for the column location of this metadata, ornull if the location type is notDeveloper.
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/spreadsheets.currentonlyhttps://www.googleapis.com/auth/spreadsheets
getLocationType()
Gets the type of location.
Return
Developer — The location type.
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/spreadsheets.currentonlyhttps://www.googleapis.com/auth/spreadsheets
getRow()
Returns theRange for the row location of this metadata, ornull if thelocation type is notDeveloper.
Return
Range|null — TheRange for the row location of this metadata, ornull if the location type is notDeveloper.
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/spreadsheets.currentonlyhttps://www.googleapis.com/auth/spreadsheets
getSheet()
Returns theSheet location of this metadata, ornull if the location type isnotDeveloper.
Return
Sheet|null — TheSheet location of this metadata, ornull if the location type is notDeveloper.
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/spreadsheets.currentonlyhttps://www.googleapis.com/auth/spreadsheets
getSpreadsheet()
Returns theSpreadsheet location of this metadata, ornull if the locationtype is notDeveloper.
Return
Spreadsheet|null — TheSpreadsheet location of this metadata, ornull if the location type is notDeveloper.
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/spreadsheets.currentonlyhttps://www.googleapis.com/auth/spreadsheets
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-11 UTC.