Class DataSourceTableColumn
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Dokumentasi mendetail
getDataSourceColumn()
Mendapatkan kolom sumber data.
Pulang pergi
DataSourceColumn
— Kolom sumber data.
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
remove()
Menghapus kolom dari DataSourceTable
.
Otorisasi
Skrip yang menggunakan metode ini memerlukan otorisasi dengan satu atau beberapa cakupan berikut:
-
https://www.googleapis.com/auth/spreadsheets.currentonly
-
https://www.googleapis.com/auth/spreadsheets
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
[null,null,["Terakhir diperbarui pada 2025-07-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eDataSourceTableColumn\u003c/code\u003e enables access and modification of existing columns within a \u003ccode\u003eDataSourceTable\u003c/code\u003e linked to a database.\u003c/p\u003e\n"],["\u003cp\u003eUse \u003ccode\u003eDataSourceTable.addColumns(columnNames)\u003c/code\u003e to add new columns to the table, instead of this class.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to retrieve the data source column (\u003ccode\u003egetDataSourceColumn()\u003c/code\u003e) and remove it from the table (\u003ccode\u003eremove()\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eBoth methods require authorization with specific scopes related to spreadsheet access.\u003c/p\u003e\n"]]],["This class manages existing columns in a DataSourceTable, which is linked to a database. Key actions include retrieving a specific column using `getDataSourceColumn()` and removing a column entirely with `remove()`. Adding new columns is done through `DataSourceTable.addColumns(columnNames)`. The methods require authorization with specific scopes related to spreadsheet access: `https://www.googleapis.com/auth/spreadsheets.currentonly` and `https://www.googleapis.com/auth/spreadsheets`. It is used with data connected to a database.\n"],null,["# Class DataSourceTableColumn\n\nDataSourceTableColumn\n\nAccess and modify an existing column in a [DataSourceTable](/apps-script/reference/spreadsheet/data-source-table). To add columns to a data\nsource table, use [DataSourceTable.addColumns(columnNames)](/apps-script/reference/spreadsheet/data-source-table#addColumns(String)).\n\n\n**Only use this class with data that's connected to a database.** \n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------------------------------|---------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------|\n| [getDataSourceColumn()](#getDataSourceColumn()) | [DataSourceColumn](/apps-script/reference/spreadsheet/data-source-column) | Gets the data source column. |\n| [remove()](#remove()) | `void` | Removes the column from the [DataSourceTable](/apps-script/reference/spreadsheet/data-source-table). |\n\nDetailed documentation\n----------------------\n\n### `get``Data``Source``Column()`\n\nGets the data source column.\n\n#### Return\n\n\n[DataSourceColumn](/apps-script/reference/spreadsheet/data-source-column) --- The data source 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### `remove()`\n\nRemoves the column from the [DataSourceTable](/apps-script/reference/spreadsheet/data-source-table).\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`"]]