Examples

Convert Excel to PDF

Easily convert Microsoft Excel files to PDF documents using DynamicPDF Converter for .NET. The following C# examples show you how.

How to Convert Excel to PDF

The following steps and C# sample code illustrate converting an Excel file to a PDF document using DynamicPDF Converter for .NET.


Steps to Convert Excel to a PDF (using static Convert method)


  1. Add the Converter class's static Convert method and specify the input Excel file and output PDF file.

Sample Code - C#


Converter.Convert("DocumentA.xlsx", "output.pdf")

Steps to Convert Excel to a PDF (using ExcelConverter and ExcelConversionOptions)


  1. Create a ExcelConversionOptions object to set the options.
  2. Create a ExcelConverter object by specifying the Excel file and the options.
  3. 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("output.pdf");

GitHub Project

Examples are provided in C# and VB.NET. Clone or view the example project at GitHub.


Clone or View Example Project on GitHub

Getting Started


Get started easily by installing DynamicPDF Converter for .NET through NuGet or manually. Then, refer to the documentation for more information on using and purchasing.


NuGet Package


The easiest way to install DynamicPDF Converter for .NET is by obtaining the NuGet package using Visual Studio's Package Manager. You can also obtain the NuGet package by downloading it directly. Refer to the installation documentation for more information.

NuGet Package ID: ceTe.DynamicPDF.Converter.NET


More Information on Excel Conversion



DynamicPDF Converter Information


DynamicPDF Converter for .NET allows any .NET developer to dynamically convert many common file formats to PDF documents in real-time. It supports converting over 50 file types to PDF, including HTML and MS Office formats. The software supports events, enabling developers to easily and accurately handle both successful and failed conversions. It is intuitive and seamlessly integrates with all our DynamicPDF products. With a Free Evaluation Edition to try, why not start using DynamicPDF Converter Today!


More information on DynamicPDF Converter for .NET

Why Choose DynamicPDF?

  • Transparent Pricing
  • Lots of Features
  • Easy to Use
  • Great Support
  • Efficient Performance
  • Product Maturity (Over 22 Years)
  • Free Evaluation
  • .NET Core Support (Most Products)
  • Flexible Licensing

We’re Not The Only Ones That Think We’re Great!