Convert Excel Files to PDF, CSV, JSON and More with Aspose.Cells Cloud
If you originally created an Excel file in a certain format—such as XLS, XLSX, XLSB, or CSV—you may find it useful to convert the Excel file to another format to take advantage of special features. For example, converting an Excel file to PDF protects its contents from unauthorized modifications and makes it easy to read and share.
Document conversion is a complex process. Many factors contribute to the conversion process’s complexity and should be considered during transformation. Providing precise, professional‑quality conversion between Excel formats is a key feature of Aspose.Cells Cloud.
The service works seamlessly for any document format conversion. You can both import and export documents in these formats:
- Import/Export: XLS, XLSX, XLSB, CSV, TSV, XLSM, ODS, TXT
- Export‑only: PDF, OTS, XPS, DIF, PNG, JPEG, BMP, SVG, TIFF, EMF, NUMBERS, FODS
Conversion APIs
| API | Description |
|---|---|
GET /cells/{name} |
Retrieves an Excel workbook from cloud storage and converts it to the requested format. |
PUT /cells/convert |
Converts an Excel workbook supplied in the request body to the specified output format. |
POST /cells/{name}/saveAs |
Saves an existing Excel workbook as another format directly to cloud storage. |
API details
-
GET /cells/{name}
- Path parameters:
name– workbook file name (required). - Query parameters:
format– target format (e.g., pdf, csv, json);storage– cloud storage name (optional);folder– folder path within storage (optional). - Response: File stream of the converted workbook;
Content‑Typematches the target format. - Status codes: 200 OK, 400 Bad Request, 401 Unauthorized, 404 Not Found, 500 Internal Server Error.
- Path parameters:
-
PUT /cells/convert
- Request body: multipart/form‑data containing the source workbook file (
file) and a requiredformatfield indicating the desired output. - Response: Binary stream of the converted file.
- Status codes: 200 OK, 400 Bad Request, 401 Unauthorized, 500 Internal Server Error.
- Request body: multipart/form‑data containing the source workbook file (
-
POST /cells/{name}/saveAs
- Path parameters:
name– existing workbook name. - Query parameters:
format– target format;outPath– destination path in cloud storage (optional);storage– storage name (optional). - Response: JSON object with operation result and the path of the saved file.
- Status codes: 200 OK, 400 Bad Request, 401 Unauthorized, 404 Not Found, 500 Internal Server Error.
- Path parameters:
Sample cURL for converting to PDF
curl -X GET "https://api.aspose.cloud/v3.0/cells/MyWorkbook.xlsx?format=pdf" \
-H "Authorization: Bearer {access_token}" \
-o MyWorkbook.pdf
Java SDK snippet (GET /cells/{name})
CellsApi apiInstance = new CellsApi();
String name = "MyWorkbook.xlsx";
String format = "pdf";
File result = apiInstance.cellsGetWorkbook(name, format, null, null);
result.renameTo(new File("MyWorkbook.pdf"));
.NET SDK snippet (PUT /cells/convert)
var api = new CellsApi();
var file = File.ReadAllBytes("MyWorkbook.xlsx");
var format = "pdf";
var result = api.ConvertWorkbook(new MemoryStream(file), format);
File.WriteAllBytes("MyWorkbook.pdf", result);
Python SDK snippet (POST /cells/{name}/saveAs)
import asposecellscloud
api = asposecellscloud.CellsApi()
api.post_save_as(name="MyWorkbook.xlsx", format="pdf", out_path="Converted/MyWorkbook.pdf")
The following articles explain each API in detail and include additional cURL and SDK examples:
- Convert an Excel file to a different format
- Save an Excel file as a different format
- Convert an Excel file to a CSV file
- Convert an Excel file to a DOCX file
- Convert an Excel file to an HTML file
- Convert an Excel file to a JSON file
- Convert an Excel file to a Markdown file
- Convert an Excel file to a PDF file
- Convert an Excel file to a PNG file
- Convert an Excel file to a PPTX file
- Convert an Excel file to a SQL file
- Convert an Excel file to a TIFF file