Τεκμηρίωση HotXLS

Add μέθοδος

Adds a horizontal page break by range, row number, or A1-style reference and returns an TXLSHPageBreak object

Σύνταξη

function Add(Before: IXLSRange): TXLSHPageBreak;
function Add(BeforeRow: Integer): TXLSHPageBreak;
function Add(ARange: WideString): TXLSHPageBreak;
      
Before IXLSRange. A Range object. The range above which the new page break will be added
BeforeRow One-based row before which the horizontal page break will be added
ARange A1-style cell reference used to choose the row for the horizontal page break

Παράδειγμα

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('G15');
  HPageBreaks.Add(20);
end;