How to Convert a Local Spreadsheet Worksheet to a PDF File: Step‑by‑Step Guide
Export a worksheet from a local Excel file to a PDF file using the Cloud API.
Convert Worksheet to PDF API
Web API
PUT https://api.aspose.cloud/v4.0/cells/convert/worksheet/pdf
Security and Authentication
The Aspose.Cells Cloud APIs are secure and require JWT token-based authentication.
Request Parameters:
| Parameter Name | Type | Path/Query String/HTTPBody | Description |
|---|---|---|---|
| Spreadsheet | File | FormData | Upload the spreadsheet file. |
| worksheet | String | Query | Name of the worksheet in the spreadsheet. |
| outPath | String | Query | (Optional) The folder path for storing the workbook; default is null. |
| outStorageName | String | Query | The output file storage name. |
| fontsLocation | String | Query | Use custom fonts for the PDF. |
| region | String | Query | Define the spreadsheet region setting. |
| password | String | Query | The password required to open the spreadsheet file. |
Response
[
{
"Name": "ResponseFile",
"DataType": {
"Identifier": "File",
"Reference": "Stream",
"Name": "file"
}
}
]
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. |
Where Should You Use the Convert Worksheet to PDF API?
- Financial Statements: Convert balance sheets, income statements (specific tables) to PDF for audit‑ready documentation.
- Sales Reports: Transform sales dashboards or commission calculations into distributable PDFs.
- Operational Metrics: Export KPI tables and performance metrics as formal PDF reports.
- Contractual Data: Export pricing tables and service‑level agreements from spreadsheets to PDF attachments.
- Audit Trails: Preserve financial worksheets as uneditable PDF evidence.
- Portfolio Summaries: Export investment performance tables as client‑ready PDF statements.
- Quality Control Reports: Export inspection worksheets to PDF for compliance records.
- Inventory Summaries: Transform stock worksheets to PDF for management review.
Why Should You Use the Convert Worksheet to PDF API?
- Developer‑Friendly: Aspose.Cells Cloud offers SDK libraries in multiple languages, enabling rapid development and comes with comprehensive documentation. Compared with building custom chart‑rendering solutions, this significantly reduces development workload.
- Cost‑Effective: You can convert table data without first uploading the workbook, which saves storage space and reduces costs.
- Formatting Preservation: Retains complex Excel formatting in a universally accessible PDF format.
How to Use the Convert Worksheet to PDF API with SDKs?
Convert Worksheet to PDF API Specification
The Convert Worksheet to PDF API Specification provides a publicly accessible programming interface and enables REST interactions directly from a web browser.
You can use the cURL command‑line tool to access Aspose.Cells web services easily. The following example shows how to make calls to the Cloud API with cURL.
Use Aspose.Cells Cloud SDKs
Using an SDK is the fastest way to develop, as it abstracts away low‑level details, allowing you to convert spreadsheet table data to a PDF file with minimal code. Please check out 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: