How to Convert Local Spreadsheet Range Data to a PDF File: Step‑By‑Step Guide
Export a range of data from a local Excel file to a PDF file using the Cloud API.
Prerequisites: Before using this API you need a valid Aspose.Cells Cloud account, a JWT access token, and optionally an Aspose.Cells Cloud SDK for your programming language. Ensure the target storage (default or custom) is configured if you plan to use the outStorageName parameter.
Convert Range to PDF API
PUT https://api.aspose.cloud/v4.0/cells/convert/range/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/HTTP Body | Description |
|---|---|---|---|
| Spreadsheet | File | FormData | Upload the spreadsheet file. |
| worksheet | String | Query | The worksheet name within the spreadsheet. |
| range | String | Query | The cell area to be converted, e.g., A1:C10. |
| outPath | String | Query | (Optional) The folder path where the workbook is stored. The default is null. |
| outStorageName | String | Query | Output file storage name. |
| fontsLocation | String | Query | Location for storing custom fonts for home use. |
| region | String | Query | The spreadsheet region setting. |
| password | String | Query | The password for opening the spreadsheet file. |
Response
[
{
"Name": "ResponseFile",
"DataType": {
"Identifier": "File",
"Reference": "Stream"
}
}
]
Typical response is a binary PDF stream returned as a file download.
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 Range to PDF API?
- Financial Statements: Convert balance sheets, income statements (specific ranges) to PDF for audit‑ready documentation.
- Sales Reports: Transform sales dashboards or commission calculations to 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 data ranges as uneditable PDF evidence.
- Portfolio Summaries: Export investment performance ranges as client‑ready PDF statements.
- Quality Control Reports: Export inspection data ranges to PDF for compliance records.
- Inventory Summaries: Transform stock‑level tables to PDF for management review.
Why Should You Use the Convert Range to PDF API?
- Developer‑Friendly: Aspose.Cells Cloud offers SDK libraries in multiple languages, enabling rapid development and comprehensive documentation. Compared with building custom chart‑rendering solutions, this significantly reduces development workload.
- Cost‑Effective: You can convert range data without first uploading the entire workbook, saving storage space and reducing costs.
- Preserves Complex Excel Formatting in a universally accessible PDF format.
How to Use the Convert Range to PDF API with SDKs?
Convert Range to PDF API Specification
The Convert Range to PDF API Specification defines a publicly accessible programming interface and allows you to perform 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 the SDK is the fastest way to develop, as it abstracts away low‑level details, allowing you to convert a range of data to a PDF file 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 make calls to Aspose.Cells web services using various SDKs: