ByteScout Spreadsheet SDK - VB.NET - Add Header and Footer - ByteScout

ByteScout Spreadsheet SDK – VB.NET – Add Header and Footer

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – VB.NET – Add Header and Footer

How to add header and footer in VB.NET and ByteScout Spreadsheet SDK

This code in VB.NET shows how to add header and footer with this how to tutorial

On this page you will learn from code samples for programming in VB.NET.Writing of the code to add header and footer in VB.NET can be done by developers of any level using ByteScout Spreadsheet SDK. ByteScout Spreadsheet SDK is the SDK component for writing, reading, modifying and calculating Excel and CSV spreadsheets. Can calculate and reculculate formulas with Excel installed. You may import or export data to and from CSV, XML, JSON. Supports export to databases, arrays, streams. It can be used to add header and footer using VB.NET.

You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout Spreadsheet SDK for add header and footer below and use it in your application. Follow the instructions from the scratch to work and copy the VB.NET code. Code testing will allow the function to be tested and work properly with your data.

Download free trial version of ByteScout Spreadsheet SDK from our website with this and other source code samples for VB.NET.

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)

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

Try ByteScout Spreadsheet SDK today:  60 Day Free Trial (on-premise) or  Web API (on-demand version)



Get 60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Get ByteScout Spreadsheet SDK Free Training


Get Your Free API Key

Explore Web API Documentation