Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/doc/workbooks/{workbookId}/sheets/{sheetId} |
| HTTP Method | GET |
| Supported app type | appType-Internal app |
| Required permissions | permission-Document.Workbook.Read-Read permissions for DingTalk Spreadsheet |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential used to call this API. To obtain it, 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. You can obtain it by calling the Get a node and Create a Knowledge Base document APIs. |
| sheetId | String | Yes | The ID or name of the worksheet. Call the Get all worksheets API to obtain the value of the id or name parameter. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| operatorId | String | Yes | The unionId of the operator. - Call the Obtain the userid of a user by using the silent login code API to obtain the value of the unionid parameter. - Call the Query user details API to obtain the value of the unionid parameter. If the operator does not have permission, the API returns the error The operator has no permission. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| id | String | The worksheet ID. |
| name | String | The worksheet name. |
| visibility | String | The visibility of the worksheet. |
| lastNonEmptyRow | Long | The position of the last non-empty row, starting from 0. Returns -1 when the worksheet is empty. |
| lastNonEmptyColumn | Long | The position of the last non-empty column, starting from 0. Returns -1 when the worksheet is empty. |
| rowCount | Long | The number of rows in the worksheet. |
| columnCount | Long | The number of columns in the worksheet. |
Response body example
Error codes
If an error occurs 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. Refer to the error message. |
| 400 | invalidRequest.inputArgs.workbookIdIllegal | The workbookId is illegal. | The workbookId is invalid. |
| 400 | invalidRequest.resource.notWorkbook | %s | Unsupported document type. Check the workbookId. |
| 400 | invalidRequest.document.stillInitializing | The document is still initializing. Please try again later. | The document is still initializing. Try again later. |
| 403 | forbidden.accessDenied | The operator has no permission. | The current user does not have permission for this action. |
| 403 | forbidden.acrossOrg | %s | The request is invalid. Check whether the document being accessed belongs to the organization specified by the access token. |
| 403 | forbidden.operationIllegal | %s | The request action is invalid. Refer to the error message. |
| 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 reducing the spreadsheet content. |
| 404 | invalidRequest.resource.notFound | %s | The request failed. The resource being accessed 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. |