HotXLS-documentatie

Tables eigenschap

Retourneert de BIFF8 Tables-collectie (Excel ListObjects) die aan dit werkblad is gekoppeld. Elke invoer is een TXLSTable-object dat een benoemd structured-reference-gebied dekt met een ingebouwde stijl en een ingebouwde autofilter. Read-only. (Beschikbaar sinds v2.33.0)

Syntaxis

eigenschap Tables: TXLSTables;

Opmerkingen

Tabellen worden vlak vóór de EOF in de BIFF8-werkbladstream weggeschreven als een FEATHEADR11 / FEAT11 / LIST12-recordgroep, en alleen als het bestandsformaat BIFF8 is (xlExcel97). The FEAT11 payload carries table AutoFilter metadata, en 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, en bened-row flags

Gebruiken 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

Voorbeeld

Dit voorbeeld itereert over de tabellen op het actieve werkblad

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

Zie ook