Method: spreadsheets.sheets.copyTo
Bir e-tablodaki tek bir sayfayı başka bir e-tabloya kopyalar. Yeni oluşturulan sayfanın özelliklerini döndürür.
HTTP isteği
POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo
URL, gRPC Kod Dönüştürme söz dizimini kullanır.
Yol parametreleri
Parametreler |
spreadsheetId |
string
Kopyalanacak sayfayı içeren e-tablonun kimliği.
|
sheetId |
integer
Kopyalanacak sayfanın kimliği.
|
İstek içeriği
İstek metni aşağıdaki yapıyla birlikte verileri içerir:
JSON gösterimi |
{
"destinationSpreadsheetId": string
} |
Alanlar |
destinationSpreadsheetId |
string
Sayfanın kopyalanacağı e-tablonun kimliği.
|
Yanıt gövdesi
Başarılıysa yanıt metni, SheetProperties
öğesinin bir örneğini içerir.
Yetkilendirme kapsamları
Aşağıdaki OAuth kapsamlarından birini gerektirir:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/spreadsheets
Daha fazla bilgi için Yetkilendirme kılavuzuna bakın.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-11-08 UTC.
[null,null,["Son güncelleme tarihi: 2024-11-08 UTC."],[[["Copies a single sheet from one Google Spreadsheet to another, returning the properties of the new sheet."],["Requires specifying the source spreadsheet and sheet IDs, along with the destination spreadsheet ID."],["Utilizes an HTTP POST request to `https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo`."],["Needs authorization with specific OAuth scopes like `https://www.googleapis.com/auth/drive` or `https://www.googleapis.com/auth/spreadsheets`."]]],["This content describes how to copy a sheet from one spreadsheet to another using an HTTP POST request to the Google Sheets API. The request URL requires the source `spreadsheetId` and `sheetId`. The request body needs a `destinationSpreadsheetId`. Upon success, the API returns the new sheet's properties. Authorization requires one of three specific OAuth scopes: `drive`, `drive.file`, or `spreadsheets`. The `try it!` section is a resource to help understand how the API works.\n"]]