Method: spreadsheets.get
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
दिए गए आईडी पर मौजूद स्प्रेडशीट दिखाता है. कॉल करने वाले को स्प्रेडशीट आईडी बताना होगा.
डिफ़ॉल्ट रूप से, ग्रिड में मौजूद डेटा नहीं दिखाया जाता. ग्रिड डेटा को इनमें से किसी एक तरीके से शामिल किया जा सकता है:
एचटीटीपी में fields
यूआरएल पैरामीटर का इस्तेमाल करके, अपने पसंदीदा फ़ील्ड की सूची बनाने के लिए फ़ील्ड मास्क तय करें
includeGridData
यूआरएल पैरामीटर को 'सही' पर सेट करें. अगर कोई फ़ील्ड मास्क सेट है, तो includeGridData
पैरामीटर को अनदेखा कर दिया जाता है
बड़ी स्प्रेडशीट के लिए, सबसे सही तरीका यह है कि सिर्फ़ वे फ़ील्ड वापस लाएं जो आपको चाहिए.
स्प्रेडशीट डेटा के सिर्फ़ सबसेट को वापस पाने के लिए, ranges
यूआरएल पैरामीटर का इस्तेमाल करें. रेंज को A1 नोटेशन का इस्तेमाल करके तय किया जाता है. आपके पास एक सेल (उदाहरण के लिए, A1
) या एक से ज़्यादा सेल (उदाहरण के लिए, A1:D5
) तय करने का विकल्प होता है. इसके अलावा, एक ही स्प्रेडशीट में मौजूद अन्य शीट की सेल (उदाहरण के लिए, Sheet2!A1:C4
) या एक साथ कई रेंज (उदाहरण के लिए, ?ranges=A1:D5&ranges=Sheet2!A1:C4
) भी ली जा सकती हैं. रेंज को सीमित करने पर, स्प्रेडशीट के सिर्फ़ वे हिस्से दिखते हैं जो मांगी गई रेंज से मेल खाते हैं.
एचटीटीपी अनुरोध
GET https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
spreadsheetId |
string
वह स्प्रेडशीट जिसका अनुरोध करना है.
|
क्वेरी पैरामीटर
पैरामीटर |
ranges[] |
string
स्प्रेडशीट से वापस लाने के लिए रेंज.
|
includeGridData |
boolean
अगर ग्रिड डेटा दिखाना है, तो True पर सेट करें. अगर अनुरोध में फ़ील्ड मास्क सेट किया गया है, तो इस पैरामीटर को अनदेखा कर दिया जाता है.
|
excludeTablesInBandedRanges |
boolean
अगर टेबल को बैंड की गई रेंज में शामिल नहीं करना है, तो यह विकल्प 'सही' पर सेट करें. अगर इसकी वैल्यू सेट नहीं की गई है, तो यह 'गलत है' पर सेट होती है.
|
अनुरोध का मुख्य भाग
अनुरोध का मुख्य हिस्सा खाली होना चाहिए.
जवाब का मुख्य हिस्सा
कामयाब रहने पर, जवाब के मुख्य हिस्से में Spreadsheet
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
इसके लिए, OAuth के इनमें से किसी एक स्कोप की ज़रूरत होती है:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/spreadsheets
https://www.googleapis.com/auth/spreadsheets.readonly
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-04-29 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-04-29 (UTC) को अपडेट किया गया."],[],[],null,["# Method: spreadsheets.get\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nReturns the spreadsheet at the given ID. The caller must specify the spreadsheet ID.\n\nBy default, data within grids is not returned. You can include grid data in one of 2 ways:\n\n- Specify a [field mask](https://developers.google.com/workspace/sheets/api/guides/field-masks) listing your desired fields using the `fields` URL parameter in HTTP\n\n- Set the [includeGridData](/workspace/sheets/api/reference/rest/v4/spreadsheets/get#body.QUERY_PARAMETERS.include_grid_data) URL parameter to true. If a field mask is set, the `includeGridData` parameter is ignored\n\nFor large spreadsheets, as a best practice, retrieve only the specific spreadsheet fields that you want.\n\nTo retrieve only subsets of spreadsheet data, use the [ranges](/workspace/sheets/api/reference/rest/v4/spreadsheets/get#body.QUERY_PARAMETERS.ranges) URL parameter. Ranges are specified using [A1 notation](https://developers.google.com/workspace/sheets/api/guides/concepts#cell). You can define a single cell (for example, `A1`) or multiple cells (for example, `A1:D5`). You can also get cells from other sheets within the same spreadsheet (for example, `Sheet2!A1:C4`) or retrieve multiple ranges at once (for example, `?ranges=A1:D5&ranges=Sheet2!A1:C4`). Limiting the range returns only the portions of the spreadsheet that intersect the requested ranges.\n\n### HTTP request\n\n`GET https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------------|--------------------------------------|\n| `spreadsheetId` | `string` The spreadsheet to request. |\n\n### Query parameters\n\n| Parameters ||\n|-------------------------------|-------------------------------------------------------------------------------------------------------------------|\n| `ranges[]` | `string` The ranges to retrieve from the spreadsheet. |\n| `includeGridData` | `boolean` True if grid data should be returned. This parameter is ignored if a field mask was set in the request. |\n| `excludeTablesInBandedRanges` | `boolean` True if tables should be excluded in the banded ranges. False if not set. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains an instance of [Spreadsheet](/workspace/sheets/api/reference/rest/v4/spreadsheets#Spreadsheet).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/drive`\n- `https://www.googleapis.com/auth/drive.readonly`\n- `https://www.googleapis.com/auth/drive.file`\n- `https://www.googleapis.com/auth/spreadsheets`\n- `https://www.googleapis.com/auth/spreadsheets.readonly`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]