Method: spreadsheets.sheets.copyTo
העתקת גיליון אחד מגיליון אלקטרוני לגיליון אלקטרוני אחר. הפונקציה מחזירה את המאפיינים של הגיליון החדש שנוצר.
בקשת HTTP
POST https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo
בכתובת ה-URL נעשה שימוש בתחביר המרת קידוד של gRPC.
פרמטרים של נתיב
פרמטרים |
spreadsheetId |
string
המזהה של הגיליון האלקטרוני שמכיל את הגיליון שרוצים להעתיק.
|
sheetId |
integer
מזהה הגיליון להעתקה.
|
גוף הבקשה
גוף הבקשה מכיל נתונים במבנה הבא:
ייצוג JSON |
{
"destinationSpreadsheetId": string
} |
שדות |
destinationSpreadsheetId |
string
המזהה של הגיליון האלקטרוני שאליו רוצים להעתיק את הגיליון.
|
גוף התשובה
אם הפעולה מצליחה, גוף התגובה מכיל מופע של SheetProperties
.
היקפי ההרשאות
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/spreadsheets
מידע נוסף זמין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-11-08 (שעון UTC).
[null,null,["עדכון אחרון: 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"]]