HotXLS Docs

TXLSVPageBreak class

Unit: lxHandle
Represents a vertical page break. The TXLSVPageBreak object is a member of the TXLSVPageBreaks collection.

Description

Use VPageBreaks.Item[index], where index is the index number of the page break, to return an TXLSVPageBreak object.

Properties

Methods

Example

This example adds a vertical page break, formats its location column, and then removes the break when the report should print as a single page wide.

var
  Sheet: IXLSWorksheet;
  BreakItem: TXLSVPageBreak;
begin
  Sheet := Workbook.Sheets[1];
  BreakItem := Sheet.VPageBreaks.Add(Sheet.Range['H1', 'H1']);

  BreakItem.Location.Interior.Color := xlYellow;

  if Sheet.VPageBreaks.Count > 1 then
    BreakItem.Delete;
end;

See also