curl -X GET "https://api.aspose.com/v3.0/cells/myWorkbook.xlsx/worksheets/Sheet1/cells/firstcell" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
参数
| 参数名 |
类型 |
描述 |
必填 |
cellOrMethodName |
string |
必须设置为 firstcell 以获取第一个单元格。 |
是 |
fileName |
string |
工作簿文件名(例如 myWorkbook.xlsx)。 |
是 |
worksheet |
string |
工作表名称(例如 Sheet1)。 |
是 |
Authorization |
header |
用于身份验证的 Bearer 令牌。 |
是 |
{
"Cell": {
"Name": "A1",
"Row": 0,
"Column": 0,
"Value": "Category",
"Type": "IsString",
"IsFormula": false,
"IsMerged": false,
"IsArrayHeader": false,
"IsInArray": false,
"IsErrorValue": false,
"IsInTable": false,
"IsStyleSet": false,
"HtmlString": "<Font Style=\"FONT-FAMILY: Calibri;FONT-SIZE: 11pt;COLOR: #ffffff;\">Category</Font>",
"Style": {
"link": {
"Href": "/style",
"Rel": "self"
}
}
},
"Code": "200",
"Status": "OK"
}
错误响应
{
"Code": "401",
"Message": "无效的访问令牌。"
}
{
"Code": "404",
"Message": "指定的工作簿、工作表或单元格不存在。"
}
{
"Code": "500",
"Message": "服务器上发生意外错误。"
}
HTTP 状态码
| 状态码 |
含义 |
描述 |
| 200 |
OK(成功) |
过滤器应用成功;响应包含操作详情。 |
| 400 |
Bad Request(错误请求) |
缺少或无效参数(例如不支持的文件类型)。 |
| 401 |
Unauthorized(未授权) |
无效或缺失 JWT 令牌。 |
| 413 |
Payload Too Large(载荷过大) |
上传文件超出大小限制。 |
| 500 |
Internal Server Error(内部服务器错误) |
服务器发生意外错误。 |