Convert Excel to PDF – Aspose.Cells Cloud API

This REST API converts a spreadsheet file to a PDF‑format file. Prerequisites: Obtain a valid JWT access token, ensure the source Excel file is stored in a supported storage, and have appropriate permissions to invoke the conversion endpoint.

PostConvertWorkbookToPDF 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

FileInfo

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 PDF file.
{
  "Filename": "example.pdf",
  "FileSize": 12345,
  "FileContent": "base64_encoded_string"
}

HTTP Status Codes

Code Meaning Description
200 OK Filter applied successfully; response contains operation details.
400 Bad Request Missing or invalid parameters (e.g., unsupported file type).
401 Unauthorized Invalid or missing JWT token.
413 Payload Too Large Uploaded file exceeds size limit.
500 Internal Server Error Unexpected server error.

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.

Request Headers

Header Type Description
Authorization string Bearer token obtained via JWT authentication.
Content-Type string Must be multipart/form-data for file upload.
Accept string application/json to receive the response metadata.

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 can simplify development by handling low‑level details. 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.