Class DeveloperMetadata Stay organized with collections Save and categorize content based on your preferences.
Page Summary
Developer metadata can be accessed and modified within a spreadsheet.
New developer metadata can be created using methods on Range, Sheet, or Spreadsheet objects.
Developer metadata has properties such as ID, key, location, value, and visibility.
Developer metadata can be moved to a different column, row, sheet, or the top-level spreadsheet.
Developer metadata can be removed and its key, value, or visibility can be set.
Access and modify developer metadata. To create new developer metadata useRange.addDeveloperMetadata(key),Sheet.addDeveloperMetadata(key), orSpreadsheet.addDeveloperMetadata(key).
Methods
| Method | Return type | Brief description |
|---|---|---|
get | Integer | Returns the unique ID associated with this developer metadata. |
get | String | Returns the key associated with this developer metadata. |
get | Developer | Returns the location of this developer metadata. |
get | String | Returns the value associated with this developer metadata, ornull if this metadata hasno value. |
get | Developer | Returns the visibility of this developer metadata. |
move | Developer | Moves this developer metadata to the specified column. |
move | Developer | Moves this developer metadata to the specified row. |
move | Developer | Moves this developer metadata to the specified sheet. |
move | Developer | Moves this developer metadata to the top-level spreadsheet. |
remove() | void | Deletes this metadata. |
set | Developer | Sets the key of this developer metadata to the specified value. |
set | Developer | Sets the value associated with this developer metadata to the specified value. |
set | Developer | Sets the visibility of this developer metadata to the specified visibility. |
Detailed documentation
getId()
Returns the unique ID associated with this developer metadata.
Return
Integer — The unique ID associated with this developer metadata.
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
getKey()
Returns the key associated with this developer metadata.
Return
String — The key associated with this developer metadata.
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
getLocation()
Returns the location of this developer metadata.
Return
Developer — The location of this developer metadata.
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
getValue()
Returns the value associated with this developer metadata, ornull if this metadata hasno value.
Return
String — The value associated with this developer metadata, ornull if this metadata has no value.
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
getVisibility()
Returns the visibility of this developer metadata.
Return
Developer — The visibility of this developer metadata.
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
moveToColumn(column)
Moves this developer metadata to the specified column. If the specified range does notrepresent a single column this throws an exception.
Parameters
| Name | Type | Description |
|---|---|---|
column | Range | The range representing the column that is the new location for this developer metadata. |
Return
Developer — The developer metadata, for chaining.
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
moveToRow(row)
Moves this developer metadata to the specified row. If the specified range does not represent asingle row this throws an exception.
Parameters
| Name | Type | Description |
|---|---|---|
row | Range | The range representing the row that is the new location for this developer metadata. |
Return
Developer — The developer metadata, for chaining.
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
moveToSheet(sheet)
Moves this developer metadata to the specified sheet.
Parameters
| Name | Type | Description |
|---|---|---|
sheet | Sheet | The sheet that is the new location for this developer metata. |
Return
Developer — The developer metadata, for chaining.
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
moveToSpreadsheet()
Moves this developer metadata to the top-level spreadsheet.
Return
Developer — The developer metadata, for chaining.
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
remove()
Deletes this metadata.
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
setKey(key)
Sets the key of this developer metadata to the specified value.
Parameters
| Name | Type | Description |
|---|---|---|
key | String | The new key to set for this metadata. |
Return
Developer — The developer metadata, for chaining.
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
setValue(value)
Sets the value associated with this developer metadata to the specified value.
Parameters
| Name | Type | Description |
|---|---|---|
value | String | The new value to set for this metadata. |
Return
Developer — The developer metadata, for chaining.
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
setVisibility(visibility)
Sets the visibility of this developer metadata to the specified visibility.
Parameters
| Name | Type | Description |
|---|---|---|
visibility | Developer | The new visibility to set for this metadata. |
Return
Developer — The developer metadata, for chaining.
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.