HotXLS Docs

Tables property

Returns the BIFF8 Tables (Excel ListObjects) collection attached to this worksheet. Each entry is a TXLSTable object covering a named structured-reference region with a built-in style and an embedded autofilter. Read-only. (Available since v2.33.0.)

Syntax

property Tables: TXLSTables;

Remarks

Tables are written into the BIFF8 worksheet stream just before EOF as a FEATHEADR11 / FEAT11 / LIST12 record group, only when the file format is BIFF8 (xlExcel97). The FEAT11 payload carries table AutoFilter metadata, and LIST12 carries the table style using the MS-XLS List12TableStyleClientInfo layout. Workbooks without tables save exactly as before. The reader populates the same collection on load (v2.33.1+), so a round-trip preserves the table range, name, display name, style, and banded-row flags.

Use AddTable as the most common entry point rather than calling Tables.Add directly. Tables ids (1..N per sheet) are assigned at save time if not pre-set.

Example

This example iterates the tables on the active sheet.

var
  i: Integer;
begin
  for i := 0 to Sheet.Tables.Count - 1 do
    Writeln(Sheet.Tables[i].Name, ' ', Sheet.Tables[i].Range);
end;

See also