Export To PDF | C#Bytescout Spreadsheet SDK

Export To PDF | C#

Program.cs:

C#
using Bytescout.Spreadsheet;
using System.IO;

namespace XLS2PDF
{
    class Program
    {
        static void Main(string[] args)
        {
            Spreadsheet document = new Spreadsheet();

            // load table from existing XLS file        
            document.LoadFromFile("SimpleReport.xls");

            // add image
            document.Workbook.Worksheets[0].Pictures.Add(5, 1, "image.jpg");

            // save as PDF
            bool autosize = false;
            document.SaveAsPDF("Output.pdf", autosize);

            // close the document 
            document.Close();
        }
    }
}