[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IVPageBreaks.Add

Add Method

Add(IRange)

Adds a vertical page break within the print area.

The page break is aligned with the left edge of the specified range.

Declaration
IVPageBreak Add(IRange Before)
Function Add(Before As IRange) As IVPageBreak
Parameters
Type Name Description
IRange Before

The range whose left edge defines where the new page break is added. If Before is null, no page break is added.

Returns
Type Description
IVPageBreak

The new IVPageBreak object, or null if Before is null.

Examples
worksheet.Range["A1:H2"].Value = new object[,] {
    {"Name", "Q1", "Q2", "Q3", "Q4", "Total", "Region", "Status"},
    {"Test", 100, 120, 140, 160, 520, "East", "Open"}
});
IVPageBreak pageBreak = worksheet.VPageBreaks.Add(worksheet.Range["F2"]);
Exceptions
Type Condition
ArgumentException

if before starts in the first column of the worksheet.

InvalidOperationException

if the maximum number of vertical page breaks has been reached.