How to Create New Excel Spreadsheets – Generate Blank or Template‑Based Files
Programmatically create new Excel spreadsheets using Aspose.Cells Cloud API. Generate blank workbooks or instantiate files from custom templates. The RESTful API enables automated Excel file creation, perfect for report generation, document automation, and data‑processing workflows.
Create Spreadsheet API
Web API
PUT https://api.aspose.cloud/v5.0/cells/spreadsheet/create
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
-H "Authorization: Bearer {access_token}"
Request Parameters
| Parameter Name | Type | Location | Description |
|---|---|---|---|
| format | String | Query | Required. File format for the new spreadsheet (e.g., XLSX, XLS, ODS, CSV). |
| template | String | Query | Optional. Name of a template file stored in your cloud storage (e.g., invoice_template.xlsx). If omitted, a blank workbook is created. |
| outPath | String | Query | Optional. Target folder path in cloud storage for the generated file. If null or omitted, the spreadsheet is saved to the default location. |
| outStorageName | String | Query | Required. Identifier of the configured cloud storage (e.g., MyDrive). |
| region | String | Query | Optional. Locale setting (e.g., fr-FR) that determines default date, number, and currency formats. |
| password | String | Query | Optional. Password for an encrypted template file. Leave empty if the template is not protected. |
Response
[
{
"Name": "ResponseFile",
"DataType": {
"Identifier": "File",
"Reference": "Stream"
}
}
]
Error Codes
| Code | Description | Resolution |
|---|---|---|
| 400 | Invalid Aspose.Cells Cloud API URI. | Verify the request URL and query parameters. |
| 401 | Invalid access token or incorrect client ID/secret. | Obtain a fresh access token and check credentials. |
| 404 | The specified spreadsheet or template file is not accessible. | Ensure the file exists in the indicated storage path and the name is correct. |
| 500 | An internal error occurred while processing the request. | Retry later or contact support with the request ID. |
Where should we use the Create Spreadsheet API?
- Initialization of the Automated Reporting System – Create a new blank workbook or generate a report file from a standard template at the start of each daily/weekly automation cycle.
- User Self‑service Portal – Allow customers to select a template (quotation, project schedule, etc.) and instantly download a customized Excel file.
- Batch Data Export and Distribution – Produce separate workbooks with a uniform format for each exported data set, simplifying downstream distribution and processing.
For subsequent operations such as adding worksheets or populating cells, see the Add Worksheet API, Update Cell API, and Export Workbook API.
Why should you use the Create Spreadsheet API?
- Developer‑Friendly – Aspose.Cells Cloud offers SDK libraries in multiple languages, enabling quick development and providing comprehensive documentation. Compared with building custom chart‑rendering solutions, this significantly reduces development effort.
- Reduced Labor Costs – Eliminates the need for dedicated staff to consolidate documents manually.
- 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 Create Spreadsheet API with SDKs
Create Spreadsheet API Specification
The Create Spreadsheet API Specification defines a publicly accessible programming interface and enables REST interactions directly from a web browser.
Use Aspose.Cells Cloud SDKs
Using an SDK is the fastest way to develop, as it abstracts low‑level details and lets you build the spreadsheet with concise code. 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: