On this page you will learn from code samples for programming in VB.NET.Writing of the code to export to pdf with spreadsheet sdk in VB.NET can be executed by programmers of any level using ByteScout Barcode Suite. ByteScout Barcode Suite: the set that includes three different SDK products to generate barcodes, read barcodes and read and write spreadsheets: Barcode SDK, Barcode Reader SDK and Spreadsheet SDK. It can export to pdf with spreadsheet sdk in VB.NET.
Want to save time? You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout Barcode Suite for export to pdf with spreadsheet sdk below and use it in your application. Just copy and paste the code into your VB.NET application’s code and follow the instructions. Further improvement of the code will make it more robust.
You can download free trial version of ByteScout Barcode Suite from our website to see and try many others source code samples for VB.NET.
Imports Bytescout.Spreadsheet Imports System.IO Module Module1 Sub Main() ' Open Spreadsheet Dim document As New Spreadsheet() document.LoadFromFile("SimpleReport.xls") ' add image document.Workbook.Worksheets(0).Pictures.Add(5, 1, "image.jpg") ' remove output file if already exists If File.Exists("Output.pdf") Then File.Delete("Output.pdf") End If ' Export to PDF Dim autosize = False document.SaveAsPDF("Output.pdf", autosize) ' Close Spreadsheet document.Close() ' open in default spreadsheets viewer/editor Process.Start("Output.pdf") End Sub End Module