PRODUCTS   DOWNLOAD PURCHASE SUPPORT BLOG  COMPANY  
 
Key Features
>>Excel to PDF
Excel to DOCX
Excel to RTF
Split and merge PDF
Download trial
Purchase
Online-demo
Documentation
What's New

"The simplest way to convert Excel to PDF in C# .Net"

The simplest way to convert Excel to PDF in C# .Net

Introduction

     If you are looking for a .Net library to convert Excel workbooks and sheets to PDF, you are in the right place. «Excel to PDF .Net» helps you convert any of .xls or .xlsx documents.

During the conversion process you may: select custom sheets and area of cells for conversion, specify page properties, add page numbers and the version of PDF format.

To illustrate how to easily convert Excel workbook to PDF, let's look at simple code in C#:

1. Add a reference to the "SautinSoft.Excel.dll":
How to add the reference to the SautinSoft.Excel.dll

Type this C# code:

          SautinSoft.ExceltoPdf x = new SautinSoft.ExceltoPdf();
          x.ConvertFile(@"d:\Table.xlsx", @"d:\Table.pdf");

Download Excel to PDF .Net Online Demo


Have a Question?

You have a question, need a support or a code example: ask our support team at support@sautinsoft.com. We will help you quickly and with pleasure.



What «Excel to PDF .Net» can give me:

  1. Save a time and cost of developing of my application. You will need to only add the reference to "SautinSoft.ExcelToPdf.dll" and write 3-4 C# lines to get ability to convert Excel to PDF, RTF, DOCX.

  2. The one product provides me by set of API to convert .xls and .xlsx to PDF, RTF, DOCX at once, split and merge PDF documents.

  3. Because of this is absolutely standalone .Net assembly, I don't need to worry about the availability of Adobe Acrobat, MS Office, OpenOffice or other software on the my client's computers.

  4. The one time price. I pay a one time and can use «Excel to PDF .Net» for a whole life without any additional fees. My license will never expires.

  5. As bonus, I get unlimited technical support during a whole life for free and independently of the date of my purchasing.

Some examples to convert Excel to PDF in C# and VB.Net

1. Let us say, to convert an Excel workbook to PDF in memory within C# application:

        public static void ConvertExcelAsMemoryStream()
        {
            // Convert Excel to PDF in memory
            ExcelToPdf x = new ExcelToPdf();

            // Set PDF as output format.
            x.OutputFormat = SautinSoft.ExcelToPdf.eOutputFormat.Pdf;

            string excelFile = @"d:\MyWorkBook.xls";
            string pdfFile = Path.ChangeExtension(excelFile, ".pdf");
            byte[] pdfBytes = null;

            try
            {
                // Let us say, we have a memory stream with Excel data.
                using (MemoryStream ms = new MemoryStream(File.ReadAllBytes(excelFile)))
                {
                    pdfBytes = x.ConvertBytes(ms.ToArray());
                }
                // Save pdfBytes to a file for demonstration purposes.
                File.WriteAllBytes(pdfFile, pdfBytes);
                System.Diagnostics.Process.Start(pdfFile);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                Console.ReadLine();
            }
        }

2. Convert .xlsx file to PDF file in VB.Net application:

    Sub Main()
        ' Specify sheets for converting
        Dim x As New ExcelToPdf()
        x.PageStyle.PageSize.Letter()

        ' Set PDF as output format.
        x.OutputFormat = SautinSoft.ExcelToPdf.eOutputFormat.Pdf

        ' Let's convert only sheets: 1,3.
        x.Sheets.Custom(New Integer() {1, 3})

        Dim excelFile As String = "d:\Sheets.xlsx"
        Dim pdfFile As String = Path.ChangeExtension(excelFile, ".pdf")


        Try
            x.ConvertFile(excelFile, pdfFile)
            System.Diagnostics.Process.Start(pdfFile)
        Catch ex As Exception
            Console.WriteLine(ex.Message)
            Console.ReadLine()
        End Try
    End Sub


Requrements and Technical Information

     «Excel to PDF .Net» can be used on 32 and 64-bits platforms with .Net 2.0 and higher. The component doesn't require Microsoft Excel or any other software. It's absolutely standalone and independent library.

Our product is compatible with all .Net languages and supports all Operating Systems where .Net Framework can be used. Note that «Excel to PDF .Net» is entirely written in managed C#.



Reasonable prices

     The library offers developers high quality conversion at reasonably prices. The main point of interest is that «Excel to PDF .Net» is less expensive than all of its more or less popular counterparts. For example, a single license cost $239 with no additional fees or royalties!


Download

To see this functionality firsthand, download the freshest «Excel to PDF .Net» with code examples, 5.67 Mb.

 
Products Downloads Support Company
Buy now
Follow us on Google Plus SautinSoft on Facebook SautinSoft on Twitter SautinSoft on Youtube Our Blog
Copyright © 2002 - 2017 SautinSoft (started from sautin.com). All rights reserved.