In this simple topic, you’ll learn how to convert XLSX to PDF with NET REST API. We will develop an XLSX to PDF converter with C# Low Code API by following the detailed and lucid steps mentioned in the following section. The developed application can be integrated with any .NET application supported in Linux, Windows, or macOS environments and conversion can be done for free.
Prerequisite
- Create an account and get API credentials to perform XLSX to PDF conversion
- Download Aspose.Cells Cloud SDK for .NET to convert XLSX to PDF
- Setup C# .NET project with the above SDK to render XLSX as PDF
Steps to Convert XLSX to PDF with NET REST API
- Set the Client ID and Client Secret for the API to convert XLSX to PDF
- Create an instance of CellsApi class with client credentials to perform XLSX to PDF conversion
- Specify the source XLSX and output PDF file names and load the source XLSX file in a memory stream
- Create an instance of the PostConvertWorkbookToPDFRequest with input XLSX file stream and other optional parameters
- Call the XLSX to PDF request method to convert XLSX to PDF with NET REST API
- Save the rendered PDF file stream on the local disk
The above mentioned steps entails the transformation of the file type from XLSX to PDF with c# low code API. We will start the process with the configuration of the SDK and creating the CellsAPI class object. We will load the source XLSX file using a FileStream and create an instance of the PostConvertWorkbookToPDFRequest class that is further used for performing the conversion to a PDF file stream using the PostConvertWorkbookToPDF() method.
Code for XLSX to PDF Conversion in NET Low Code API
This basic example code lets you convert XLSX to PDF with c# cloud API. You only need to give access and path for the XLSX file on the disk with the help of the Aspose.Cells REST API SDK will perform the conversion, and then, after the conversion process is completed, download the output PDF file stream to save it locally.
We have learned to transform XLSX to PDF with Cloud API in this topic. If you are interested in performing Excel to HTML conversion, refer to the article on how to Convert Excel to HTML with NET REST API.