ByteScout Spreadsheet SDK – VBScript – Save As PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – VBScript – Save As PDF

ByteScout Spreadsheet SDK – VBScript – Save As PDF

Save As PDF.vbs

Set document = CreateObject("Bytescout.Spreadsheet.Spreadsheet")

document.RegistrationName = "demo"
document.RegistrationKey = "demo"

 ' Add new worksheet
Set worksheet = document.Workbook.Worksheets.Add("HelloWorld")

' add a cell 
Set cell = worksheet.Cell(1, 1)
cell.Value = "Testing, Testing, Testing, Testing..."

' Save spreadsheet as PDF file:

' Save PDF with automatic page size...
document.SaveAsPDF "autosized.pdf"
' ... or save PDF with fixed page size
document.SaveAsPDF_2 "fixedsize.pdf", False ' the second parameter disables autosizing 

' close Spreadsheet
Set document = Nothing



  Click here to get your Free Trial version of the SDK

prev
next