How to Rename Worksheets in Excel - Change Sheet Names
Programmatically rename worksheets in Excel workbooks using Aspose.Cells Cloud API. Change sheet names, update tab labels dynamically, and automate spreadsheet organization through RESTful API calls. Perfect for document standardization and workflow automation.
Rename worksheet name in Spreadsheet API
API Endpoint
PUT http://api.aspose.cloud/v4.0/cells/spreadsheet/rename/worksheet
Request Parameters:
| Parameter Name | Type | Path/Query String/HTTPBody | Description |
|---|---|---|---|
| Spreadsheet | File | FormData | Required. The Excel workbook file (.xlsx, .xls, etc.) containing the worksheet to be renamed. |
| sourceName | String | Query | Required. The current/existing name of the worksheet you wish to rename. |
| targetName | String | Query | Required. The new name to assign to the worksheet. Must follow Excel naming rules (e.g., no :, \, ?, *, [, ]) and be unique within the workbook. |
| outPath | String | Query | Optional. The target folder path in cloud storage where the renamed workbook will be saved. If null or omitted, it may save to the same location as the source or a default path. |
| outStorageName | String | Query | Required. The name identifier of your configured cloud storage service (e.g., ArchiveStorage) where the output file will be stored. |
| region | String | Query | Optional. The locale setting (e.g., ko-KR) to apply, which may influence character encoding or regional naming conventions. |
| password | String | Query | Optional. The decryption password required to open and modify a password-protected workbook. Omit if the file is not encrypted. |
Response
[
{
"Name": "ResponseFile",
"DataType": {
"Identifier": "File",
"Reference": "Stream"
}
}
]
Error Codes
- 400 Bad Request: Invalid Aspose.Cells Cloud API URI.
- 401 Unauthorized: Invalid access token. Or invalid client id and secret.
- 404 Not Found: The spreadsheet file not accessible.
- 500 Server Error: The spreadsheet has encountered an anomaly in obtaining calculation data.
Where should we use the Rename Worksheet in Spreadsheet API?
- Report Generation and Brand Standardization: When generating customer reports automatically, the generic worksheet names (such as
Sheet1) are dynamically renamed to customer-specific or project-specific names (such asAcmeCorp_Q1_Summary) to ensure professional delivery. - Data Processing Pipeline Standardization: In the ETL process, the worksheets exported from the original data source with irregular names are renamed to standardized names (such as
Raw_Data,Cleaned_Data), to meet the input requirements of subsequent analysis systems. - Multilingual Content Delivery: According to the user’s language preference, before delivering the files, the localized names (such as
数据) or English names (such asData) in the worksheets are converted to their corresponding counterparts to provide a localized experience.
Why should you use the Rename Worksheet in Spreadsheet API?
- Developer-Friendly: Aspose.Cells Cloud offers SDK libraries in multiple languages, enabling quick development and comes with comprehensive documentation. Compared to building custom chart rendering solutions, this significantly reduces the development workload.
- Reduced Labor Costs: Reduced the need for positions dedicated to document consolidation.
- Pay-per-use: No upfront investment, only pay for API calls actually used.
- Zero Maintenance Costs: No need to maintain servers, update software, or deal with compatibility issues.
How to Use the Rename Worksheet in Spreadsheet API with SDKs
OpenAPI Specification
The OpenAPI Specification details a publicly accessible programming interface, allowing for REST interactions directly from a web browser.
Use Aspose.Cells Cloud SDKs
Using the SDK is the best way to accelerate development. The SDK handles the underlying details, allowing you to simply implement rename worksheet name in spreadsheets for cells with minimal code. Please check out the GitHub repository for a complete list of Aspose.Cells Cloud SDKs.
The following code examples illustrate how to call Aspose.Cells web services using various SDKs: