- Home
- Purchase
- Developer Tools
- BarCode Generator SDK
- BarCode Generator SDK for Javascript for Code 128
- BarCode Reader SDK
- PDF Generator SDK for Javascript
- PDF Extractor SDK
- PDF Renderer SDK
- PDF To HTML SDK
- PDF Viewer SDK
- Spreadsheet SDK
- Image To Video SDK
- Screen Video Capturing SDK
- SWF To Video and Images SDK
- Images Watermarking SDK
- Document SDK beta
- Misc Tools
- Desktop Utilities
- Download
- Support
- Company
- Labs
How to export data from XLS spreadsheet to PDF file in C# with Spreadsheet SDK
The sample below shows how to export data from XLS spreadsheet to PDF file in C#. Spreadsheet SDK loads table from Excel file, adds image and saves the result as PDF.
C#
using System; using System.Collections.Generic; using System.Text; using Bytescout.Spreadsheet; using System.Drawing; 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(0, 5, "image1.jpg"); // save as PDF if (File.Exists("output.pdf")) File.Delete("output.pdf"); document.SaveAsPDF("Output.pdf"); // save as XLS if (File.Exists("Output.xls")) File.Delete("Output.xls"); document.SaveAsXLS("Output.xls"); // close the document document.Close(); } } }
Filed in:
Spreadsheet SDK
Tutorials:









