Delete a Column on an Excel Worksheet
Contents
[
Hide
]
This REST API deletes one or more columns in an Excel worksheet.
REST API
DELETE https://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/cells/columns/{columnIndex}
Request parameters
| Parameter Name | Type | Location | Required | Description |
|---|---|---|---|---|
| name | string | path | Yes | The workbook file name. |
| sheetName | string | path | Yes | The worksheet name. |
| columnIndex | integer | path | Yes | Zero‑based index of the first column to delete. |
| startColumn | integer | query | No | Zero‑based index of the column where the deletion starts (defaults to columnIndex). |
| totalColumns | integer | query | No | Number of columns to delete. If omitted, only the column identified by columnIndex is removed. |
| updateReference | boolean | query | No | When true, cell references (including formulas) are updated automatically after the deletion. |
| folder | string | query | No | Path to the folder that contains the workbook. |
| storageName | string | query | No | Name of the Aspose Cloud storage service. |
Example request
Responses
| HTTP Code | Description | Example |
|---|---|---|
| 200 | Success – the column(s) were deleted. | { "Code": 200, "Status": "OK" } |
| 400 | Bad request – missing or invalid parameters. | { "Code": 400, "Message": "Invalid totalColumns value." } |
| 401 | Unauthorized – missing or invalid access token. | { "Code": 401, "Message": "Authentication failed." } |
| 404 | Not found – workbook or worksheet does not exist. | { "Code": 404, "Message": "Worksheet 'Sheet1' not found." } |
| 500 | Internal server error – unexpected condition on the server. | { "Code": 500, "Message": "An unexpected error occurred." } |
The OpenAPI Specification defines the full programming interface and lets you perform REST interactions directly from a web browser.
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: