Convert Excel to PDF (.NET Framework)
How to Convert Excel to PDF
The following steps and sample code illustrate converting an Excel file to a PDF document using the DynamicPDF Converter product. Converting an Excel file to PDF file is as simple as a method call using the static Convert method of the Converterclass by passing the source excel file path and the output PDF path. However, if required, advanced ExcelConversionOptions and ExcelConverter classes can also be used.
Steps to Convert Excel to a PDF
- Create a
ExcelConversionOptions
object to set the options. - Create a
ExcelConverter
object by specifying the Excel file and the options. - Invoke the
Convert
method on the ExcelConverter and specify the PDF file name.
Sample Code - C#
ExcelConversionOptions options = new ExcelConversionOptions(false);
ExcelConverter excelConverter = new ExcelConverter("DocumentA.xlsx", options);
excelConverter.Convert("OfficeExcelFileConversion.pdf");
Sample Code - C# using Convert()
Converter.Convert("DocumentA.xlsx", "MyOutput.pdf")
Getting Started
DynamicPDF Converter Information
More information can be found here:
Try the free evaluation.