Method: spreadsheets.values.update
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
स्प्रेडशीट की किसी रेंज में वैल्यू सेट करता है. कॉल करने वाले को स्प्रेडशीट आईडी, रेंज, और valueInputOption
बताना होगा.
एचटीटीपी अनुरोध
PUT https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
spreadsheetId |
string
अपडेट की जाने वाली स्प्रेडशीट का आईडी.
|
range |
string
अपडेट की जाने वाली वैल्यू का A1 नोटेशन.
|
क्वेरी पैरामीटर
पैरामीटर |
valueInputOption |
enum (ValueInputOption )
इनपुट डेटा को कैसे समझा जाना चाहिए.
|
includeValuesInResponse |
boolean
यह तय करता है कि अपडेट के जवाब में, अपडेट की गई सेल की वैल्यू शामिल होनी चाहिए या नहीं. डिफ़ॉल्ट रूप से, जवाबों में अपडेट की गई वैल्यू शामिल नहीं होती हैं. अगर लिखी गई रेंज, असल रेंज से बड़ी थी, तो जवाब में अनुरोध की गई रेंज की सभी वैल्यू शामिल होती हैं. हालांकि, आखिर में मौजूद खाली पंक्तियों और कॉलम को शामिल नहीं किया जाता.
|
responseValueRenderOption |
enum (ValueRenderOption )
इससे यह तय होता है कि रिस्पॉन्स में वैल्यू को कैसे रेंडर किया जाना चाहिए. रेंडर करने का डिफ़ॉल्ट विकल्प FORMATTED_VALUE है.
|
responseDateTimeRenderOption |
enum (DateTimeRenderOption )
इससे यह तय होता है कि जवाब में तारीखों, समय, और अवधियों को कैसे रेंडर किया जाना चाहिए. अगर responseValueRenderOption FORMATTED_VALUE है, तो इसे अनदेखा कर दिया जाता है. dateTime के लिए, रेंडर करने का डिफ़ॉल्ट विकल्प SERIAL_NUMBER है.
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में ValueRange
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में UpdateValuesResponse
का एक इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
इसके लिए, 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 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-03-22 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-03-22 (UTC) को अपडेट किया गया."],[],[],null,["# Method: spreadsheets.values.update\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\nSets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a [valueInputOption](/workspace/sheets/api/reference/rest/v4/ValueInputOption).\n\n### HTTP request\n\n`PUT https://sheets.googleapis.com/v4/spreadsheets/{spreadsheetId}/values/{range}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-----------------|------------------------------------------------------------------------------------------------------------------------------|\n| `spreadsheetId` | `string` The ID of the spreadsheet to update. |\n| `range` | `string` The [A1 notation](https://developers.google.com/workspace/sheets/api/guides/concepts#cell) of the values to update. |\n\n### Query parameters\n\n| Parameters ||\n|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `valueInputOption` | `enum (`[ValueInputOption](/workspace/sheets/api/reference/rest/v4/ValueInputOption)`)` How the input data should be interpreted. |\n| `includeValuesInResponse` | `boolean` Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns). |\n| `responseValueRenderOption` | `enum (`[ValueRenderOption](/workspace/sheets/api/reference/rest/v4/ValueRenderOption)`)` Determines how values in the response should be rendered. The default render option is [FORMATTED_VALUE](/workspace/sheets/api/reference/rest/v4/ValueRenderOption). |\n| `responseDateTimeRenderOption` | `enum (`[DateTimeRenderOption](/workspace/sheets/api/reference/rest/v4/DateTimeRenderOption)`)` Determines how dates, times, and durations in the response should be rendered. This is ignored if [responseValueRenderOption](/workspace/sheets/api/reference/rest/v4/spreadsheets.values/update#body.QUERY_PARAMETERS.response_value_render_option) is [FORMATTED_VALUE](/workspace/sheets/api/reference/rest/v4/ValueRenderOption). The default dateTime render option is [SERIAL_NUMBER](/workspace/sheets/api/reference/rest/v4/DateTimeRenderOption). |\n\n### Request body\n\nThe request body contains an instance of [ValueRange](/workspace/sheets/api/reference/rest/v4/spreadsheets.values#ValueRange).\n\n### Response body\n\nIf successful, the response body contains an instance of [UpdateValuesResponse](/workspace/sheets/api/reference/rest/v4/UpdateValuesResponse).\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.file`\n- `https://www.googleapis.com/auth/spreadsheets`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]