ByteScout Spreadsheet SDK - VB.NET - Add Header and Footer - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

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.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.vb
      
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

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Spreadsheet SDK Home Page

Explore ByteScout Spreadsheet SDK Documentation

Explore Samples

Sign Up for ByteScout Spreadsheet SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next