ByteScout Spreadsheet SDK – C# – Export To PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Export To PDF

ByteScout Spreadsheet SDK – C# – Export To PDF

Program.cs

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();
        }
    }
}


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next