Update a List Object in an Excel Worksheet
This REST API updates the properties of a list object (table) in an Excel worksheet.
Request Body Schema
The listObject DTO contains the following fields. Only the fields you need to change are required in the request body.
| Field | Type | Required | Description |
|---|---|---|---|
| DisplayName | string | optional | The name displayed for the table. |
| StartRow / StartColumn | integer | optional | Zero‑based index of the first row/column of the table. |
| EndRow / EndColumn | integer | optional | Zero‑based index of the last row/column of the table. |
| Range | string | optional | A‑1 style address that defines the table range (e.g., A1:D10). |
| ShowHeaderRow | boolean | optional | true to display the header row. |
| ShowTotals | boolean | optional | true to display the totals row. |
| TableStyleName | string | optional | Name of the built‑in table style to apply. |
| TableStyleType | string | optional | Style type (TableStyleLight, TableStyleMedium, etc.). |
| ListColumns | array of objects | optional | Collection of column definitions (Name, TotalsCalculation). |
| Sorter, AutoFilter, ShowTableStyle… | object | optional | Advanced styling and filtering options (see full DTO in the OpenAPI spec). |
Minimal Example Payload
{
"DisplayName": "SalesData",
"Range": "A1:E20",
"ShowHeaderRow": true,
"ShowTotals": false
}
REST API
POST https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/listobjects/{listObjectIndex}
Request parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| name | string | path | Document name. |
| sheetName | string | path | Worksheet name. |
| listObjectIndex | integer | path | Index of the list object to update. |
| listObject | object | body | ListObject DTO in the request body. |
| folder | string | query | Folder that contains the document. |
| storageName | string | query | Name of the storage. |
The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.
Request
Error Responses
| HTTP Code | Description | Sample Payload |
|---|---|---|
| 400 | Bad request – missing required fields or malformed JSON. | { "Code": 400, "Message": "Invalid request body." } |
| 401 | Unauthorized – JWT token is missing or invalid. | { "Code": 401, "Message": "Authentication failed." } |
| 404 | Not found – the specified workbook, worksheet, or list object does not exist. | { "Code": 404, "Message": "Resource not found." } |
| 500 | Internal server error – unexpected condition on the server side. | { "Code": 500, "Message": "Server error." } |
FAQ
How do I update a list object using the Aspose.Cells Cloud API?
Use the POST /cells/{name}/worksheets/{sheetName}/listobjects/{listObjectIndex} endpoint. Include a JSON body with the properties you wish to change (e.g., DisplayName, ShowHeaderRow). Authenticate with a JWT token in the Authorization header.
What response do I receive after a successful update?
A JSON object with Code: 200 and Status: "OK" is returned. If an error occurs, the response contains the appropriate HTTP status code and an Error object describing the problem.
Can I update only a subset of list object properties?
Yes. Include only the fields you want to modify in the request body; all omitted fields remain unchanged.
Related Documentation
Cloud SDK Family
Using an SDK is the best way to speed up development. An SDK handles low‑level details so you can focus on your project tasks. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples demonstrate how to call Aspose.Cells web services using various SDKs: