An easy to understand sample source code to learn how to add header and footer with spreadsheet sdk in VB.NET Want to add header and footer with spreadsheet sdk in your VB.NET app? ByteScout Barcode Suite is designed for it. ByteScout Barcode Suite is 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.
These VB.NET code samples for VB.NET guide developers to speed up coding of the application when using ByteScout Barcode Suite. Follow the instructions from scratch to work and copy the VB.NET code. Use of ByteScout Barcode Suite in VB.NET is also described in the documentation included along with the product.
All these programming tutorials along with source code samples and ByteScout free trial version are available for download from our website.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
Imports System.Diagnostics
Imports System.IO
Imports Bytescout.Spreadsheet
Class Program
Friend Shared Sub Main(ByVal args As String())
' Create new Spreadsheet object
Dim doc As New Spreadsheet()
' Add worksheet
Dim worksheet As Worksheet = doc.Worksheets.Add()
' Add headers:
' add date as left header
worksheet.PageSetup.LeftHeader = "&D"
' add label with custom font as center header
worksheet.PageSetup.CenterHeader = "&""Verdana,bold""&14Laws && Rights"
' add time as right header
worksheet.PageSetup.RightHeader = "&T"
' Add footers:
' add file name as left footer
worksheet.PageSetup.LeftFooter = "&F"
' add "page of pages" indicator as center footer
worksheet.PageSetup.CenterFooter = "&P/&N"
' add simple text as right footer
worksheet.PageSetup.RightFooter = "Right footer"
' Add worksheet content
worksheet.Cell(1, 1).Value = "Click Print Preview to see headers and footers."
' Delete output file if exists
If File.Exists("output.xls") Then
File.Delete("output.xls")
End If
' Save document
doc.SaveAs("output.xls")
' Close spreadsheet
doc.Close()
doc.Dispose()
' Open generated XLS document in default application
Process.Start("output.xls")
End Sub
End Class
60 Day Free Trial or Visit ByteScout Barcode Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
60 Day Free Trial or Visit ByteScout Barcode Suite Home Page
Explore ByteScout Barcode Suite Documentation
Explore Samples
Sign Up for ByteScout Barcode Suite Online Training
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: