סקירה כללית על Google Sheets API
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
Google Sheets API הוא ממשק RESTful שמאפשר לקרוא ולשנות נתונים בגיליון אלקטרוני. Sheets API מאפשר לכם:
- יצירת גיליונות אלקטרוניים
- קריאה וכתיבה של ערכי תאים בגיליון אלקטרוני
- עדכון העיצוב של הגיליון האלקטרוני
- ניהול של גיליונות מקושרים
ריכזנו כאן רשימה של מונחים נפוצים שקשורים ל-Sheets API:
- גיליון אלקטרוני
האובייקט הראשי ב-Google Sheets. הוא יכול להכיל כמה תגי Sheets
, כל אחד עם מידע מובנה שמופיע בתוך Cells
. המשאב
spreadsheets
מייצג גיליון אלקטרוני. הוא מכיל ערך ייחודי של spreadsheetId
.
- מזהה הגיליון האלקטרוני
- המזהה הייחודי של גיליון אלקטרוני. זו מחרוזת מסוימת שמכילה אותיות, מספרים ותווים מיוחדים מסוימים, שמפנה לגיליון אלקטרוני, ואפשר להפיק אותה מכתובת ה-URL של הגיליון האלקטרוני. המזהים של הגיליונות האלקטרוניים הם קבועים, גם אם השם של הגיליון האלקטרוני משתנה.
https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit?gid=SHEET_ID#gid=SHEET_ID
- גיליון
דף או כרטיסייה בגיליון אלקטרוני. המשאב
Sheets
מייצג גיליון. הוא מכיל ערך מספרי ייחודי sheetId
וגיליון title
כחלק מהאובייקט SheetProperties
.
- מזהה גיליון
- המזהה הייחודי של גיליון ספציפי בגיליון אלקטרוני. זהו מספר שלם שמכיל ספרות שמפנות לגיליון, ואפשר להפיק אותו מכתובת ה-URL של הגיליון האלקטרוני. מזהי הגיליונות הם יציבים, גם אם השם של הגיליון משתנה. דוגמה מופיעה בקטע מזהה גיליון אלקטרוני.
- תא
שדה נתונים או טקסט בודד בגיליון. התאים מסודרים בשורות ובעמודות, ואפשר לקבץ אותם כטווח תאים. משאב
Cells
מייצג כל תא, אבל אין לו ערך מזהה ייחודי.
במקום זאת, התאים מזוהים באמצעות קואורדינטות של שורות ועמודות.
- שיטת הסימון A1
- תחביר שמשמש להגדרת תא או טווח תאים באמצעות מחרוזת שמכילה את שם הגיליון בתוספת הקואורדינטות של תא ההתחלה ותא הסיום, תוך שימוש באותיות של העמודות ובמספרי השורות. השיטה הזו היא הנפוצה והשימושית ביותר כשמפנים לטווח מוחלט של תאים.
-
Sheet1!A1:B2
מתייחס לכל התאים בשתי השורות והעמודות הראשונות של Sheet1.
-
Sheet1!A:A
מתייחס לכל התאים בעמודה הראשונה של Sheet1.
-
Sheet1!1:2
מתייחס לכל התאים בשתי השורות הראשונות של Sheet1.
-
Sheet1!A5:A
מתייחס לכל התאים בעמודה הראשונה של גיליון 1, משורה 5 ואילך.
-
A1:B2
מתייחס לכל התאים בשתי השורות והעמודות הראשונות של הגיליון הראשון שמוצג.
-
Sheet1
מתייחס לכל התאים בגיליון 1.
-
'Jon's_Data'!A1:D5
מתייחס לכל התאים בחמש השורות הראשונות ובארבע העמודות הראשונות של גיליון בשם Jon's_Data.
-
'My Custom Sheet'!A:A
מתייחס לכל התאים בעמודה הראשונה של גיליון שנקרא My Custom Sheet.
-
'My Custom Sheet'
מתייחס לכל התאים בגיליון 'הגיליון המותאם אישית שלי'.
אם שם הגיליון מכיל רווחים או תווים מיוחדים, צריך להשתמש במירכאות בודדות.
טיפ: אם אפשר, כדאי להשתמש בשמות שונים לאובייקטים בגיליונות האלקטרוניים. לדוגמה, A1 (בלי מרכאות) מתייחס לתא A1 בגיליון הראשון שגלוי. 'A1'
מתייחס לגיליון בשם A1. באופן דומה, Sheet1 מתייחס לגיליון בשם Sheet1. עם זאת, אם יש טווח בעל שם שנקרא Sheet1, אז Sheet1 מתייחס לטווח בעל השם ו-'Sheet1'
מתייחס לגיליון.
- שיטת הסימון R1C1
- תחביר שמשמש להגדרת תא או טווח של תאים באמצעות מחרוזת שמכילה את שם הגיליון בתוספת הקואורדינטות של תא ההתחלה ותא הסיום באמצעות מספרי שורות ומספרי עמודות. השיטה הזו פחות נפוצה מסימון A1, אבל היא יכולה להיות שימושית כשמפנים לטווח של תאים ביחס למיקום של תא נתון.
-
Sheet1!R1C1:R2C2
מתייחס לשני התאים הראשונים בשתי השורות העליונות של Sheet1.
-
R1C1:R2C2
מתייחס לשני התאים הראשונים בשתי השורות העליונות של הגיליון הראשון שמוצג.
-
Sheet1!R[3]C[1]
מתייחס לתא שנמצא שלוש שורות מתחת לתא הנוכחי ועמודה אחת מימין לו.
- טווח תאים בעל שם
- תא או טווח תאים מוגדרים עם שם מותאם אישית כדי לפשט את ההפניות באפליקציה. משאב
FilterView
מייצג טווח עם שם.
- טווח תאים מוגן
- תא מוגדר או טווח תאים מוגדרים שאי אפשר לשנות. משאב
ProtectedRange
מייצג טווח תאים מוגן.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-29 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-29 (שעון UTC)."],[],[],null,["# Google Sheets API Overview\n\nThe Google Sheets API is a RESTful interface that lets you read and modify a\nspreadsheet's data. The Sheets API lets you:\n\n- Create spreadsheets\n- Read and write spreadsheet cell values\n- Update spreadsheet formatting\n- Manage Connected Sheets\n\nThe following is a list of common terms used in the Sheets API:\n\n*Spreadsheet*\n\n: The primary object in Google Sheets. It can contain multiple `Sheets`, each\n with structured information contained in `Cells`. The\n [`spreadsheets`](/workspace/sheets/api/reference/rest/v4/spreadsheets)\n resource represents a spreadsheet. It contains a unique `spreadsheetId`\n value.\n\n *Spreadsheet ID*\n : The unique identifier for a spreadsheet. It's a particular string\n containing letters, numbers, and some special characters that reference a\n spreadsheet and it can be derived from the spreadsheet's URL. Spreadsheet\n IDs are stable, even if the spreadsheet name changes. \n\n https://docs.google.com/spreadsheets/d/\u003cvar translate=\"no\"\u003eSPREADSHEET_ID\u003c/var\u003e/edit?gid=\u003cvar translate=\"no\"\u003eSHEET_ID\u003c/var\u003e#gid=\u003cvar translate=\"no\"\u003eSHEET_ID\u003c/var\u003e\n\n*Sheet*\n\n: A page or tab within a spreadsheet. The\n [`Sheets`](/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets) resource\n represents a sheet. It contains a unique numeric `sheetId` value and sheet\n `title` as part of the\n [`SheetProperties`](/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#sheetproperties)\n object.\n\n *Sheet ID*\n : The unique identifier for a specific sheet within a spreadsheet. It's a\n particular integer containing numbers that reference a sheet and it can be\n derived from the spreadsheet's URL. Sheet IDs are stable, even if the sheet\n name changes. For an example, see [Spreadsheet ID](#spreadsheet-id).\n\n*Cell*\n\n: An individual field of text or data within a sheet. Cells are arranged in rows\n and columns, and can be grouped as a range of cells. The\n [`Cells`](/workspace/sheets/api/reference/rest/v4/spreadsheets/cells)\n resource represents each cell, but it doesn't have a unique ID value.\n Instead, row and column coordinates identify the cells.\n\n *A1 notation*\n : A syntax used to define a cell or range of cells with a string that\n contains the sheet name plus the starting and ending cell coordinates using\n column letters and row numbers. This method is the most common and useful\n when referencing an absolute range of cells.\n - `Sheet1!A1:B2` refers to all the cells in the first two rows and columns of Sheet1.\n - `Sheet1!A:A` refers to all the cells in the first column of Sheet1.\n - `Sheet1!1:2` refers to all the cells in the first two rows of Sheet1.\n - `Sheet1!A5:A` refers to all the cells of the first column of Sheet 1, from row 5 onward.\n - `A1:B2` refers to all the cells in the first two rows and columns of the first visible sheet.\n - `Sheet1` refers to all the cells in Sheet1.\n - `'Jon's_Data'!A1:D5` refers to all the cells in the first five rows and four columns of a sheet named \"Jon's_Data.\"\n - `'My Custom Sheet'!A:A` refers to all the cells in the first column of a sheet named \"My Custom Sheet.\"\n - `'My Custom Sheet'` refers to all the cells in \"My Custom Sheet\".\n\n Single quotes are required for sheet names with spaces or special characters.\n\n **Tip** : Where possible, use distinct names for objects in your spreadsheets. For example, A1 (without quotes) refers to cell A1 in the first visible sheet. `'A1'` refers to a sheet with the name A1. Similarly, Sheet1 refers to a sheet with the name Sheet1. However, if there's a named range titled \"Sheet1\", then Sheet1 refers to the named range and `'Sheet1'` refers to the sheet.\n\n *R1C1 notation*\n : A syntax used to define a cell or range of cells with a string that\n contains the sheet name plus the starting and ending cell coordinates using\n row numbers and column numbers. This method is less common than A1 notation,\n but can be useful when referencing a range of cells relative to a given\n cell's position.\n - `Sheet1!R1C1:R2C2` refers to the first two cells in the top two rows of Sheet1.\n - `R1C1:R2C2` refers to the first two cells in the top two rows of the first visible sheet.\n - `Sheet1!R[3]C[1]` refers to the cell that is three rows below and one column to the right of the current cell.\n\n *Named range*\n : A defined cell or range of cells with a custom name to simplify references\n throughout an application. A\n [`FilterView`](/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#filterview)\n resource represents a named range.\n\n *Protected range*\n : A defined cell or range of cells that cannot be modified. A\n [`ProtectedRange`](/workspace/sheets/api/reference/rest/v4/spreadsheets/sheets#protectedrange)\n resource represents a protected range.\n\nRelated topics\n--------------\n\n- To learn about developing with Google Workspace APIs, including handling\n authentication and authorization, refer to [Develop on\n Google Workspace](/workspace/guides/get-started).\n\n- To learn how to configure and run a Sheets API app, try the\n [JavaScript quickstart](/workspace/sheets/api/quickstart/js)."]]