Click or drag to resize

Getting Started

You can easily use «Excel to PDF .Net» in any .NET Framework or .NET Core application. Because of the component is completely written in C# managed code.

  1. Launch Microsoft's Visual Studio.

  2. Create a new project or open an existing.

  3. Add a reference to sautinsoft.exceltopdf:

    You may do this by two ways:

    1. Using Nuget (fast way):

      (Solution Explorer->right click by "References"->Manage Nuget Packages...->In the tab "Browse" type "sautinsoft" and find the "sautinsoft.exceltopdf")

      Excel to PDF .Net

    2. Second (old good way): Adding a reference to the "SautinSoft.ExcelToPdf.dll" file:

      First of all, download the Excel to PDF .Net package. Unzip it at any place in your computer and find the assembly file "SautinSoft.ExcelToPdf.dll".

      (Solution Explorer->right click by "References"->Add Reference...->Browse "SautinSoft.ExcelToPdf.dll")

      Add reference

Note  Note

SautinSoft.ExcelToPdf.dll compiled for .NET Core is located inside (exceltopdf_net.zip->Excel to PDF .Net (X.X.X.X)\Bin\.NET Core X.X) folder.

SautinSoft.ExcelToPdf.dll compiled for .NET Framework is located inside (exceltopdf_net.zip->Excel to PDF .Net (X.X.X.X)\Bin\.NET Framework X.X) folder.

SautinSoft.ExcelToPdf.dll compiled for .NET 5 and up is located inside (exceltopdf_net.zip->Excel to PDF .Net (X.X.X.X)\Bin\.NET X.X) folder.

Add dependencies through Nuget (optional)

If you have added the SautinSoft.ExcelToPdf.dll into your project using Nuget, all dependencies are already installed automatically and therefore simply skip this step. If you are creating a .NET Framework (not .NET Core) app, also skip this step.

In case of you have added the reference to the SautinSoft.ExcelToPdf.dll by the old way (Solution Explorer->right click by "References"->Add Reference...), please add these dependencies using Nuget:

  • System.IO.Packaging: "4.4.0" or up,

  • System.Text.Encoding.CodePages: "4.5.0" or up,

  • System.Xml.XPath.XmlDocument: "4.3.0" or up,

  • System.Drawing.Common": "4.7.0 or up.

Note  Note

Actually, you may add specified versions of the dependencies shown above or use the newer versions.

For example, to add "System.IO.Packaging, 4.4.0:

(Solution Explorer->right click by "References"->Manage Nuget Packages...->In the tab "Browse" type "System.IO.Packaging" and find the "System.IO.Packaging", select version "4.4.0")

install dependencies through nuget

Well done!

Now your application is able to convert any *.xls and *.xlsx (Excel 97 - 2019 workbook) to PDF, RTF and DOCX formats!

Here you will find the Code Samples in C# and VB.NET.