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. RESTful API for automated Excel file creation, perfect for report generation, document automation, and data processing workflows.
Create Spreadsheet API
API Endpoint
PUT http://api.aspose.cloud/v4.0/cells/spreadsheet/create
Request Parameters:
| Parameter Name | Type | Path/Query String/HTTP Body | Description |
|---|---|---|---|
| format | String | Query | Required. Specifies the file format for the new spreadsheet. Supported values include XLSX (default), XLS, ODS, CSV, TSV, etc. |
| template | String | Query | Optional. The name of a pre-existing template file stored in your cloud storage (e.g., invoice_template.xlsx). If provided, the new spreadsheet is created with its structure, styles, and data. If omitted, a blank workbook is created. |
| outPath | String | Query | Optional. The target folder path in cloud storage where the newly created spreadsheet will be saved. If null or omitted, it is saved in a default location. |
| outStorageName | String | Query | Required. The name identifier of your configured cloud storage service (e.g., CompanyDrive) where the output file will be stored. |
| region | String | Query | Optional. The locale setting (e.g., fr-FR) to apply to the new spreadsheet, which determines default formats for dates, numbers, and currency. |
| password | String | Query | Optional. The password required if the specified template file is encrypted. Leave empty if the template is not password-protected. |
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 Create Spreadsheet API?
- Initialization of the Automated Reporting System: At the beginning of the daily/weekly business report automation process, a new blank workbook is dynamically created, or a report file is generated based on a standardized analysis template, serving as the starting point for data filling.
- User Self-service Portal: On the customer portal, users can select different templates (such as quotations, project schedules) and immediately generate and download the corresponding customized Excel files.
- Batch Data Export and Distribution: When exporting data from the database or internal system in batches, a separate new workbook with uniform format is created for each exported data set, facilitating subsequent distribution and processing.
Why should you use the Create 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 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 the SDK is the fastest way to develop, as it abstracts away the low-level details, allowing you to build the spreadsheet with short code. 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: