HotXLS Delphi Excel Read Write Library / Component Developers Guide loslab Inc.

Add method

Adds a horizontal page break. Returns an TXLSHPageBreak object.

Syntax

function Add(Before: IXLSRange): TXLSHPageBreak;
Before IXLSRange. A Range object. The range above which the new page break will be added.

Example

This example adds a horizontal page break above cell G15 and adds a vertical page break to the left of this cell.

With Workbook.Sheets[1] do 
begin
  HPageBreaks.Add(Range['G15', 'G15']);
  VPageBreaks.Add(Range['G15', 'G15']);
end;
Copyright©2014 loslab.com