Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/doc/workbooks/{workbookId}/sheets/{sheetId} |
| HTTP Method | PUT |
| Supported app type | appType-Internal app |
| Permissions | permission-Document.Workbook.Write-DingTalk Spreadsheet write permission |
Request header
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential for calling this API. To obtain the credential, call the Get the access token of an internal app API. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workbookId | String | Yes | The ID of the spreadsheet file. The nodeId(dentryUuid) returned by the Knowledge Base API is the workbookId of the spreadsheet. To obtain it, call the Get node or Create a Knowledge Base document API. |
| sheetId | String | Yes | The ID or title of the worksheet. To obtain the id and title of a worksheet, call the Get all worksheets API. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| operatorId | String | Yes | The unionId of the operator. To obtain it, call the Query user details API. If the operator does not have the required permissions, the API returns the error The operator has no permission. |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
| frozenRowCount | Long | No | The row index at which to freeze rows. Starts from 1. A value of 0 means no rows are frozen. For example, set this value to 3 to freeze rows 1 through 3. |
| frozenColumnCount | Long | No | The column index at which to freeze columns. Starts from 1. A value of 0 means no columns are frozen. For example, set this value to 3 to freeze columns 1 through 3. |
| visibility | String | No | Whether to hide the worksheet. Valid values: - visible: Show. - hidden: Hide. |
| name | String | No | The new worksheet name. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| id | String | The worksheet id. |
Response body example
Error codes
If an error is returned when you call this API, look up the solution in the Global error codes document based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | invalidRequest.inputArgs.invalid | %s | The request parameter is invalid. See the error message for details. |
| 400 | invalidRequest.inputArgs.workbookIdIllegal | The workbookId is illegal. | The workbookId is invalid. |
| 400 | invalidRequest.resource.notWorkbook | %s | The document type is not supported. Check the workbookId. |
| 400 | invalidRequest.inputArgs.unionIdIllegal | The operatorId is illegal. | The operatorId is invalid. |
| 403 | forbidden.accessDenied | The operator has no permission. | The current user does not have permission to perform this action. |
| 403 | forbidden.acrossOrg | %s | The request is invalid. Check whether the target document belongs to the organization specified by the access token. |
| 403 | forbidden.operationIllegal | %s | The request action is invalid. See the error message for details. |
| 403 | forbidden.document.sizeOverLimit | The document size is over limit and the server is unable to complete your request. Retry is unlikely to work unless the document size is decreased. | The spreadsheet content is too large. Try to reduce the spreadsheet content. |
| 404 | invalidRequest.resource.notFound | %s | The request failed because the target resource cannot be found. |
| 500 | serviceBusy | The server is busy and unable to complete your request. Please try again later. | The service is busy. Try again later. |
| 500 | internalError | The server encountered an internal error and was unable to complete your request. Please try again later. | An internal service error occurred. Try again later. |