Link Search Menu Expand Document

Insert Page Break - VB.NET

Spreadsheet SDK sample in VB.NET demonstrating ‘Insert Page Break’

Imports System.IO
Imports System.Diagnostics
Imports Bytescout.Spreadsheet
Imports Bytescout.Spreadsheet.Structures

Class Program
	Friend Shared Sub Main(args As String())
		' Create new Spreadsheet
		Dim document As New Spreadsheet()

		' Add new worksheet
		Dim worksheet As Worksheet = document.Workbook.Worksheets.Add("HelloWorld")

		' Set cell value
		worksheet.Cell(0, 0).Value = "Hello, World!"

		' Add horizontal page break
		worksheet.HPageBreaks.Add(New CellsRange("A10"))

		' Add vertical page break
		worksheet.VPageBreaks.Add(New CellsRange("F1"))

		' Save document

		' Close Spreadsheet

		' Open generated XLS document in default associated application
	End Sub
End Class

Download Source Code (.zip)

Return to the previous page Explore Spreadsheet SDK