Version

InsertPageBreak(WorksheetRow) Method

Inserts a horizontal page break above the specified row.
Syntax
'Declaration
 
Public Overloads Sub InsertPageBreak( _
   ByVal row As WorksheetRow _
) 
public void InsertPageBreak( 
   WorksheetRow row
)

Parameters

row
The row at which to insert the page break.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionOccurs when row is null.
System.ArgumentExceptionOccurs when row is at the top edge of the Worksheet.
Remarks

If the row is not contained in one of the print areas in the PrintAreas collection, the page breaks added will be as follows: If the row is at the top edge of the Worksheet, an exception will be thrown. If the row is anywhere else in the Worksheet, a horizontal page break will be inserted above the row.

If the row is contained in one of the print areas in the PrintAreas collection, the page breaks added will be as follows: If the row is at the top edge of the print area, no page break will be inserted. If the row is anywhere else in the print area, a horizontal page break will be inserted above the row.

Requirements

Target Platforms: Windows 8.1, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

View on GitHub