QQ::weixin::work::wedoc::spreadsheet
文档
编辑文档
编辑表格内容 最后更新:2022/12/10
https://developer.work.weixin.qq.com/document/path/97628
该接口可以对一个在线表格批量执行多个更新操作。
注意:
批量更新请求中的各个操作会逐个按顺序执行,直到全部执行完成则请求返回,或者其中一个操作报错则不再继续执行后续的操作。 每一个更新操作在执行之前都会做请求校验(包括权限校验、参数校验等等),如果校验未通过则该更新操作会报错并返回,不再执行后续操作。 单次批量更新请求的操作数量 <= 5。
{ "docid": "DOCID", "requests": [ { "add_sheet_request": {...} }, { "update_range_request": {...} }, { "delete_dimension_request": {...} }, { "delete_sheet_request": {...} } ] }
参数 类型 是否必须 说明 access_token 是 调用接口凭证 docid string 是 文档的docid requests object[] 是 更新操作列表,详见 UpdateRequest
自建应用需配置到“可调用应用”列表中的应用secret所获取的accesstoken来调用(accesstoken如何获取?) 第三方应用需具有“文档”权限 代开发自建应用需具有“文档”权限
{ "errcode": 0, "errmsg": "ok", "data" { "responses": [ { "add_sheet_response": {...} }, { "update_range_response": {...} }, { "delete_dimension_response": {...} }, { "delete_sheet_response": {...} } ] } }
参数 类型 说明 errcode int32 错误码 errmsg string 错误码说明 data.responses object[] 结果列表,详见UpdateResponse
https://developer.work.weixin.qq.com/document/path/97628#参数详细说明
获取文档数据
获取表格行列信息 最后更新:2024/02/04
https://developer.work.weixin.qq.com/document/path/97711
该接口用于获取在线表格的工作表、行数、列数等。
{ "docid": "DOCID" }
参数 类型 是否必须 说明 access_token 是 调用接口凭证 docid string 是 在线表格的docid
{ "errcode": 0, "errmsg": "ok", "properties": [ { ... } ] }
参数 类型 说明 errcode int32 错误码 errmsg string 错误码说明 properties object[](Properties) 工作表属性
Properties 工作表元数据相关的资源描述
示例
{ "sheet_id", "ABCDE", "title": "XXXXXX", "row_count": 100, "column_count": 100 } 字段名 数据类型 描述 sheet_id string 工作表ID,工作表的唯一标识 title string 工作表名称 row_count uint32 表格的总行数 column_count uint32 表格的总列数
获取表格数据 最后更新:2023/01/06
https://developer.work.weixin.qq.com/document/path/97661
本接口用于获取指定范围内的在线表格信息,单次查询的范围大小需满足以下限制:
查询范围行数 <=1000 查询范围列数 <=200 范围内的总单元格数量 <=10000
{ "docid": "DOCID", "sheet_id": "AABBCC", "range": "A1:B2" }
参数 类型 是否必须 说明 access_token 是 调用接口凭证 docid string 是 在线表格唯一标识 sheet_id string 是 工作表ID,工作表的唯一标识 range string 是 查询的范围,格式遵循 A1表示法
{ "errcode": 0, "errmsg": "ok", "data": { "result": { ... } } }
参数 类型 说明 errcode int32 错误码 errmsg string 错误码说明 data.result object(GridData) 表格数据
https://developer.work.weixin.qq.com/document/path/97661#参数详细说明
To install QQ::weixin::work, copy and paste the appropriate command in to your terminal.
cpanm
cpanm QQ::weixin::work
CPAN shell
perl -MCPAN -e shell install QQ::weixin::work
For more information on module installation, please visit the detailed CPAN module installation guide.