public void InsertPageBreak( WorksheetCell cell )
Exception | Description |
---|---|
System.ArgumentNullException | Occurs when cell is null. |
System.ArgumentException | Occurs when cell is at the top-left corner of the Worksheet. |
If the cell is not contained in one of the print areas in the PrintAreas collection, the page breaks added will be as follows: If the cell is at the top-left corner of the Worksheet, an exception will be thrown. If the cell is on the left edge of the Worksheet, a horizontal page break will be inserted above the cell. If the cell is on the top edge of the Worksheet, a vertical page break will be inserted to the left of the cell. If the cell is anywhere else in the Worksheet, a horizontal page break will be inserted above the cell and a vertical page break will be inserted to the left of the cell.
If the cell is contained in one of the print areas in the PrintAreas collection, the page breaks added will be as follows: If the cell is at the top-left corner of the print area, no page breaks will be inserted. If the cell is on the left edge of the print area, a horizontal page break will be inserted above the cell. If the cell is on the top edge of the print area, a vertical page break will be inserted to the left of the cell. If the cell is anywhere else in the print area, a horizontal page break will be inserted above the cell and a vertical page break will be inserted to the left of the cell.
When page breaks are inserted in a print area, they will only extend to the edges of the print area.
Target Platforms: Android 4.4+, iOS 8+
Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+