Copy contents and formats from another worksheet.
This REST API copies a worksheet and its formats to a new sheet within the same workbook.
REST API
POST http://api.aspose.cloud/v3.0/cells/{name}/worksheets/{sheetName}/copy
The request parameters are listed below:
| Parameter Name | Type | Location | Description |
|---|---|---|---|
name |
string | path | The name of the workbook file. |
sheetName |
string | path | The name of the destination worksheet (the new sheet). |
sourceSheet |
string | query | The name of the worksheet to be copied. |
options |
object | body | JSON object containing copy options (e.g., column width, formulas). |
sourceWorkbook |
string | query | The name of the source workbook if it differs from the current workbook. |
sourceFolder |
string | query | The folder path where the source workbook is stored. |
folder |
string | query | The folder path where the destination workbook will be saved. |
storageName |
string | query | The name of the storage service to use. |
Request & Response Examples
The OpenAPI Specification defines a publicly accessible programming interface and lets you carry out REST interactions directly from a web browser.
You can use the cURL command‑line tool to access Aspose.Cells web services easily. The following example shows how to make calls to the Cloud API with cURL.
Error Handling
The API returns standard HTTP status codes together with a JSON error body. Typical responses include:
| HTTP Code | Description | Sample JSON Error Body |
|---|---|---|
| 400 | Bad request – missing or invalid parameters. | { "Code": 400, "Message": "Invalid request parameters." } |
| 401 | Unauthorized – missing or invalid token. | { "Code": 401, "Message": "Authentication failed." } |
| 404 | Not found – workbook, worksheet, or folder does not exist. | { "Code": 404, "Message": "Resource not found." } |
| 500 | Internal server error – unexpected condition. | { "Code": 500, "Message": "An unexpected error occurred." } |
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 make calls to Aspose.Cells web services using various SDKs: