选择应用类型
企业内部应用开发

获取工作表新版SDK

更新于 2024-12-27

接口调用量说明钉钉标准版接口累计可调用次数为1万次/月,当前接口会消耗调用次数。若该调用量无法满足需求,你可升级钉钉专业版(Open API调用量50万次/月)钉钉专属版(Open API调用量500万次/月)扩容调用次数。
调用本接口,获取某个工作表属性。

例如,测试统计表格内Sheet1工作表信息,如下图所示。

调用本接口,可获取Sheet1工作表的属性信息,包括工作表ID、工作表名称、工作表行数、工作表列数等信息。

权限

要调用此API,需要以下权限之一。

应用类型

是否支持

权限

API Explorer调试

企业内部应用支持钉钉表格读权限API Explorer
第三方企业应用暂不支持暂不支持暂不支持
第三方个人应用暂不支持暂不支持暂不支持

请求方法

Loading...

Header参数

名称

类型

是否必填

描述

x-acs-dingtalk-access-token

String

调用该接口的访问凭证。

Path参数

名称

类型

是否必填

描述

workbookId

String

表格文件 ID ,知识库 API 返回的nodeId(dentryUuid)即是表格workbookId,可通过调用获取节点创建知识库文档接口获取。

sheetId

String

工作表ID或名称,可调用获取所有工作表接口获取id或name参数值。

Query参数

名称

类型

是否必填

描述

operatorId

String

操作人的unionId。

说明

若操作人无权限,接口会报错The operator has no permission

返回参数

名称

类型

描述

id

String

工作表ID。

name

String

工作表名称。

visibility

String

工作表可见性。

lastNonEmptyRow

Long

最后一行非空行的位置,从0开始,表为空时返回-1。

lastNonEmptyColumn

Long

最后一列非空列的位置,从0开始,表为空时返回-1。

rowCount

Long

工作表行数。

columnCount

Long

工作表列数。

示例

请求示例

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

返回示例

Loading...

错误码

HttpCode

错误码

错误信息

说明

400

invalidRequest.inputArgs.invalid

%s

请求参数不合法,请查看错误信息。

400

invalidRequest.inputArgs.workbookIdIllegal

The workbookId is illegal.

workbookId不合法。

400

invalidRequest.resource.notWorkbook

%s

不支持的文档类型,请检查workbookId。

400

invalidRequest.document.stillInitializing

The document is still initializing. Please try again later.

文档初始化中,请稍后重试。

403

forbidden.accessDenied

The operator has no permission.

当前用户无此操作权限。

403

forbidden.acrossOrg

%s

请求不合法,请检查要访问的文档是否归属于accessToken指定的组织。

403

forbidden.operationIllegal

%s

请求操作不合法,请查看错误信息。

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.

表格内容过大,请尝试缩减表格内容。

404

invalidRequest.resource.notFound

%s

请求失败,无法找到要访问的资源。

500

serviceBusy

The server is busy and unable to complete your request. Please try again later.

服务繁忙,请稍后重试。

500

internalError

The server encountered an internal error and was unable to complete your request. Please try again later.

服务内部错误,请稍后再试。

点击纠错