Free Trial
Web API version
Licensing
Request A Quote
HAVE QUESTIONS OR NEED HELP? SUBMIT THE SUPPORT REQUEST FORM or write email to SUPPORT@BYTESCOUT.COM
Export To PDF | VB.NET
Module1.vb:
VB
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