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

Web API

PUT https://api.aspose.cloud/v4.0/cells/spreadsheet/rename/worksheet

Request Parameters

Parameter Name Type Location Description
Spreadsheet File FormData Required. The Excel workbook file (.xlsx, .xls, etc.) containing the worksheet to be renamed.
sourceName String Query Required. The current 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 (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, the service saves the file to the same folder as the source workbook (or a default path).
outStorageName String Query Optional. The name identifier of your configured cloud storage service (e.g., ArchiveStorage). If omitted, the default storage is used.
region String Query Optional. The locale setting (e.g., ko-KR) that 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

A successful request returns a JSON object with status information and a link to the renamed file.

{
  "Code": 200,
  "Status": "OK",
  "File": {
    "Href": "https://api.aspose.cloud/v4.0/storage/file/output/renamed.xlsx",
    "Name": "renamed.xlsx",
    "Size": 123456
  }
}

Error Codes

  • 400 Bad Request – Invalid Aspose.Cells Cloud API URI or malformed parameters.
  • 401 Unauthorized – Missing or invalid access token.
  • 404 Not Found – The spreadsheet file is not accessible or the specified worksheet does not exist.
  • 500 Server Error – The spreadsheet encountered an internal processing error.

Where should we use the Rename Worksheet in Spreadsheet API?

  • Report Generation and Brand Standardization – When generating customer reports automatically, generic worksheet names (e.g., Sheet1) are renamed to customer‑specific names (e.g., AcmeCorp_Q1_Summary) to ensure a professional delivery.
  • Data‑Processing Pipeline Standardization – In ETL workflows, worksheets exported with irregular names are renamed to standardized names such as Raw_Data or Cleaned_Data to satisfy downstream analysis requirements.
  • Multilingual Content Delivery – Based on the user’s language preference, worksheet names are localized (e.g., 数据 or Data) before the file is delivered, providing a tailored experience.

Why should you use the Rename Worksheet in Spreadsheet API?

  • Developer‑Friendly – Aspose.Cells Cloud offers SDK libraries in multiple languages, enabling rapid development with comprehensive documentation. Compared with building a custom solution, this significantly reduces development effort.
  • Reduced Labor Costs – Reduces the need for positions dedicated to manual document consolidation.
  • Pay‑per‑Use – No upfront investment; you only pay for the API calls you actually use.
  • Zero Maintenance Costs – No servers to maintain, no software updates, and no compatibility concerns.

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 an SDK is the quickest way to accelerate development. The SDK abstracts the underlying HTTP details, letting you rename worksheets with minimal code. See 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: