Unit: lxHandle
Represents a horizontal page break. The TXLSHPageBreak object is a member of the
TXLSHPageBreaks collection.
Description
Use HPageBreaks.Item[index], where index is the index number of the page break, to return an TXLSHPageBreak object.
Example
This example adds a horizontal page break, formats its location row,
and then removes the break when the report can fit on one printed page.
var
Sheet: IXLSWorksheet;
BreakItem: TXLSHPageBreak;
begin
Sheet := Workbook.Sheets[1];
BreakItem := Sheet.HPageBreaks.Add(Sheet.Range['A30', 'A30']);
BreakItem.Location.Interior.Color := xlYellow;
if Sheet.HPageBreaks.Count > 1 then
BreakItem.Delete;
end;
See also