[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IHPageBreaks.Add

Add Method

Add(IRange)

Adds a horizontal page break within the print area.

The new page break is inserted above the specified range. Use HPageBreaks to access the collection of horizontal page breaks for a worksheet.

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

The range above which the new page break will be added.

Returns
Type Description
IHPageBreak

The new IHPageBreak object.

Examples
worksheet.Range["A1:B5"].Value = new object[,] {
    {"Name", "Value"}, {"A", 100}, {"B", 200}, {"C", 300}, {"D", 400}
});
IRange before = worksheet.Range["A4"];
IHPageBreak pageBreak = worksheet.HPageBreaks.Add(before);