This article demonstrates how to convert Excel (XLS, XLSX) files to PDF format using C#. The Portable Document Format (PDF) format developed by Adobe is used as a standard by many organizations to share and store documents. Exporting documents to PDF is a common scenario for many applications.
C# API for Excel to PDF Conversion Convert Excel to PDF in C# Set PDF Compliance in Excel to PDF Track Excel to PDF Conversion in C# C# API for Excel to PDF Conversion Aspose.
Directly Converting Excel Files to Pdf with Aspose.Cells
In previous versions, converting Excel files to Pdf needs two components: Aspose.Cells and Aspose.Pdf. With the new version v4.7.0, users can use Aspose.Cells for .NET only to implement this feature. This new change greatly optimizes speed and memory usage.
You will utilize the overloaded Save method of the Workbook class providing the SaveFormat.Pdf enum member that converts the native excel file to pdf format.
The above steps are implemented in the following example.