Convert Excel to PDF – Aspose.Cells Cloud API
This REST API converts a spreadsheet file to a PDF‑format file.
REST API
POST https://api.aspose.cloud/v3.0/cells/convert/pdf
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
Query Parameter
| Parameter Name | Type | Description |
|---|---|---|
| password | string | Password to open the Excel file. |
| storageName | string | The name of the storage where the file is located. |
| checkExcelRestriction | bool | Whether to enforce Excel file restrictions when modifying cell‑related objects. |
checkExcelRestriction defaults to false if omitted.
Request Body Parameter
| Parameter Name | Type | Description |
|---|---|---|
| datafile | file | The data file saved as the first part of the multipart content. |
Response
The response returns a JSON object with file metadata. The PDF file itself can be downloaded using the provided FileContent (base64) or via the FileInfo link.
The API returns a JSON object of type FileInfo:
- FileInfo – object containing the name, size, and base‑64‑encoded content of the generated Markdown file.
{
"Filename": "example.pdf",
"FileSize": 12345,
"FileContent": "base64_encoded_string"
}
HTTP Status Codes
| Status Code | Description |
|---|---|
| 200 OK | File converted successfully; response contains PDF file information. |
| 400 Bad Request | Invalid request parameters or malformed file. |
| 401 Unauthorized | Missing or invalid access token. |
| 500 Internal Server Error | Server‑side error during conversion. |
How to Use the PostConvertWorkbookToPDF API with SDKs
PostConvertWorkbookToPDF API Specification
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. Include an access token in the Authorization header, then run the request below.
Use Aspose.Cells Cloud SDKs
Using an SDK is the best way to speed up development. An SDK handles low‑level details, allowing you to 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:
Other APIs that implement this function
| API | Type | Description | Swagger Link |
|---|---|---|---|
| /cells/convert | PUT | Converts a workbook from request content to a specified format. | PutConvertWorkBook |
POST /cells/{name}/saveAs API lets you save an MS Excel file as a PDF with additional settings and store the result in the storage.
This REST API converts an Excel file to PDF.
PUT /cells/convert API lets you convert an MS Excel file to PDF with additional settings and return the result in the response.
GET /cells/{name} API lets you convert an MS Excel file to PDF with additional settings and return the result in the response.
These PutConvertWorkBook, GetWorkBook, and PostDocumentSaveAs APIs define a publicly accessible programming interface and allow you to perform REST interactions directly from a web browser.
For additional conversion options, see the Save Options page.