ByteScout Spreadsheet SDK - C# - Insert Page Break - ByteScout

ByteScout Spreadsheet SDK – C# – Insert Page Break

  • Home
  • /
  • Articles
  • /
  • ByteScout Spreadsheet SDK – C# – Insert Page Break

How to insert page break in C# and ByteScout Spreadsheet SDK

Write code in C# to insert page break with this step-by-step tutorial

Every ByteScout tool contains example C# source codes that you can find here or in the folder with installed ByteScout product. ByteScout Spreadsheet SDK is the SDK that can write and read, modify and calculate Excel and CSV spreadsheets. Most popular formulas are supported. You may import or export data to and from CSV, XML, JSON as well as to and from databases, arrays. It can be used to insert page break using C#.

This rich sample source code in C# for ByteScout Spreadsheet SDK includes the number of functions and options you should do calling the API to insert page break. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! You can use these C# sample examples in one or many applications.

Trial version of ByteScout Spreadsheet SDK is available for free. Source code samples are included to help you with your C# app.

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

using System.IO; using System.Diagnostics; using Bytescout.Spreadsheet; using Bytescout.Spreadsheet.Structures; namespace InsertPageBreak { class Program { static void Main(string[] args) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); // Add new worksheet Worksheet 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 document.SaveAs("Output.xls"); // Close Spreadsheet document.Close(); // Open generated XLS document in default associated application Process.Start("Output.xls"); } } }

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