This page covers public classic XLS API members that belong to lxHandle, lxDataToXLS, and lxGridToXLS
IXLSWorkbook calculation properties
property CalculationMode: LongWord;
property FormulaArrayMemoryLimit: Int64;
property EnableIteration: Boolean;
property MaxIterations: LongWord;
property MaxIterationChange: Double;
property RecalcOnSave: Boolean;
property UseFullPrecision: Boolean;
| CalculationMode |
Controls the workbook calculation mode stored with the file |
| FormulaArrayMemoryLimit |
Bounds the payload allocated by generated formula arrays such as MUNIT, defaults to 64 MiB, and clamps values below a single Double element |
| EnableIteration |
Enables iterative calculation for circular formulas |
| MaxIterations |
Maximum Gauss-Seidel pass count for each circular-reference strongly connected component |
| MaxIterationChange |
Maximum numeric delta accepted before a circular-reference component stops iterating |
| RecalcOnSave |
Requests workbook recalculation when Excel saves the file |
| UseFullPrecision |
Keeps full formula precision; when disabled, formula and What-If data-table caches are rounded to their effective displayed numeric precision before dependants read them |
Formula entry validation
property IXLSWorkbook.FormulaEntryPolicy: TXLSFormulaEntryPolicy;
function TXLSWorksheet.ValidateFormulaEntry(Row, Col: Integer;
const Formula: WideString): TXLSFormulaEntryValidationResult;
The shared validation contract classifies empty input, unknown functions, unknown names, syntax failures, invalid coordinates, and any formula the Classic XLS target cannot represent, without changing worksheet state; see
Formula entry validation policy
IXLSWorkbook render calibration
property RenderCalibration: TXLSRenderCalibration;
function CaptureRenderCalibration: TXLSRenderCalibration;
procedure ResetRenderCalibration;
function CreateRenderGeometry(ABackend: TXLSRenderGeometryBackend;
ACacheCapacity: Integer = 4096): IXLSRenderGeometry;
Whole-record assignment validates all six fields before the workbook is changed, CaptureRenderCalibration returns an independent value snapshot for a single measurement or export operation, and ResetRenderCalibration restores the standard 1/1/1/1/100/96 values
This runtime-only configuration is not serialised into the XLS file and does not modify worksheet row heights or column widths
CreateRenderGeometry copies the current calibration into an operation-owned service and binds its cache identity to the current workbook generation and chosen backend; later workbook calibration changes cannot alter an existing service
Range AutoFit and each TXLSPaginationModel.Build call capture the workbook calibration once; AutoFit is the only consumer that deliberately writes fitted dimensions, whilst pagination preserves every stored row height and column width
IXLSWorkbook document properties
property Title: WideString;
property Subject: WideString;
property Author: WideString;
property Keywords: WideString;
property Comments: WideString;
property Company: WideString;
property Manager: WideString;
These properties read and write the workbook summary information fields saved with the classic XLS file
IXLSWorkbook Close method
function Close: Integer;
Closes the workbook object and releases workbook-owned content held by the classic XLS object model
property MetadataOnly: Boolean;
property SelectedSheets: TStringList;
property IncompleteLoad: Boolean;
| MetadataOnly |
When set before Open, reads only workbook metadata and sheet descriptors and skips cell data |
| SelectedSheets |
List of sheet names to load when the workbook is opened; an empty list loads every sheet |
| IncompleteLoad |
True after Open when cell data was skipped because MetadataOnly or SelectedSheets was used |
A workbook opened with MetadataOnly or a non-empty
SelectedSheets cannot be saved; Save raises
an error until the workbook is reopened without those options
TXLSColumnInfo collapsed state
property TXLSWorksheet._ColumnInfo: TXLSColumnInfoList;
property TXLSColumnInfo.Collapsed: Boolean;
property TXLSRowInfo.Collapsed: Boolean;
property TXLSColumnInfoList.Collapsed[Index: Integer]: Boolean;
Collapsed exposes the BIFF column outline marker independently of Hidden and OutlineLevel. The list index is a zero-based classic XLS column index. Missing columns read as False, and assigning False to a missing column allocates no metadata. Column-format copies, worksheet copies, and save-and-reopen cycles preserve the marker
The underlying storage accessors are public for low-level workbook inspection. TXLSRowInfo reports MinCol and MaxCol (the covered one-based column span), CustomHeight and CustomFormat (whether an explicit height or XF index is stored), and XFIndexSet; TXLSColumnInfo.isEqual compares two column metadata entries field by field
TXLSColumnInfoList exposes ColCount, MinCol, MaxCol, StdWidth, and MaxOutlineLevel for bounds and default-width diagnostics, CalcMaxOutLineLevel recomputes the cached maximum outline level after direct metadata edits, CopyColFormat clones one column entry onto another index, DeleteCol removes an entry, and FindNextColToStore walks stored entries for BIFF COLINFO record writers, reporting the next span in the MinCol / MaxCol out-parameters
TXLSWorksheet outline-node methods
function TryGetOutlineNode(AAxis: TXLSOutlineAxis; ANodeIndex: Integer; out ANode: TXLSOutlineNode): Boolean;
function SetOutlineNodeCollapsed(AAxis: TXLSOutlineAxis; ANodeIndex: Integer; ACollapsed: Boolean; AChildMode: TXLSOutlineChildMode = xocPreserve): Boolean;
procedure SetOutlineDisplayLevel(AAxis: TXLSOutlineAxis; ADisplayLevel: Integer; AChildMode: TXLSOutlineChildMode = xocPreserve);
These methods adapt classic row and column metadata to the shared sparse outline model, derive the requested summary node from its outline direction, and apply compressed hidden and collapse changes without probing unused worksheet coordinates
ANodeIndex is the one-based physical summary row or column, ADisplayLevel follows the one-based outline-button convention, and xocPreserve keeps nested child collapse markers independent by default
TXLSWorksheet pane and print-title methods
function ThawPanes(Y, X: Single; RowTop, ColLeft: Word): Integer;
function SplitPanes(Width, Height: Single): Integer;
function UnsplitPanes: Integer;
function GetSelectedAreas(APane: TXLSPanePosition; out ActiveAreaIndex: Integer): TXLSSelectedAreas;
function SelectAreas(APane: TXLSPanePosition; const Areas: array of WideString; ActiveAreaIndex: Integer = 0): Boolean;
function TryGetWindowScroll(APane: TXLSPanePosition; out ARow, ACol: Integer): Boolean;
function ScrollWindow(APane: TXLSPanePosition; ARow, ACol: Integer): Boolean;
function RepeatRows(FirstRow, LastRow: Word): Integer;
function RepeatColumns(FirstCol, LastCol: Word): Integer;
ThawPanes, SplitPanes, and UnsplitPanes control split-pane state, while RepeatRows and RepeatColumns set print-title rows or columns for the worksheet
GetSelectedAreas and the pane-first
SelectAreas overload provide the shared logical-pane selection contract described in
Worksheet pane selections
Consecutive BIFF selection records for one pane form a single logical group, edited groups are written in chunks of at most 1369 areas, and worksheet copies retain every pane group
Whole-row and whole-column structural edits remap every valid pane group whilst preserving ordered survivors and active-area identity, with deterministic successor, predecessor, and boundary-cell fallbacks
Malformed or contradictory selection records stay opaque, are replayed byte for byte when saved, and report xlsDiagnosticSelectionRecordInvalid rather than exposing partially trusted typed state
TryGetWindowScroll and ScrollWindow expose the shared 1-based four-pane scroll contract, mapping upper and left axes to Window2 and lower and right axes to Pane
TXLSWorksheet typed data-validation methods
function AddWholeNumberValidation(ARange: WideString; AOp: TXLSDvOperator; const AFormula1: WideString; const AFormula2: WideString = ''): TDataValidation;
function AddDecimalValidation(ARange: WideString; AOp: TXLSDvOperator; const AFormula1: WideString; const AFormula2: WideString = ''): TDataValidation;
function AddDateValidation(ARange: WideString; AOp: TXLSDvOperator; const AFormula1: WideString; const AFormula2: WideString = ''): TDataValidation;
function AddTimeValidation(ARange: WideString; AOp: TXLSDvOperator; const AFormula1: WideString; const AFormula2: WideString = ''): TDataValidation;
function AddTextLengthValidation(ARange: WideString; AOp: TXLSDvOperator; const AFormula1: WideString; const AFormula2: WideString = ''): TDataValidation;
function AddCustomValidation(ARange: WideString; const AFormula: WideString): TDataValidation;
Each helper creates a typed data-validation rule for ARange and returns the created TDataValidation instance so prompt, error, and blank-handling options can be adjusted
TXLSWorksheet pivot table members
property PivotTables: TXLSPivotTables;
function AddPivotTable(const SourceRangeA1: WideString; DestRow, DestCol: Integer; const Name: WideString): TXLSPivotTable;
function PivotSetDataFieldFormat(DataField: TXLSPivotDataField; const FormatStr: WideString): Word;
Use
AddPivotTable to create a typed pivot table from a source range, then use
PivotTables and
PivotSetDataFieldFormat to inspect or format the generated model. See
Classic XLS pivot table API
function SetArrayFormula(const Formula: WideString): Integer;
function XFIndex: Integer;
property FirstRow: Word;
property LastRow: Word;
property FirstCol: Byte;
property LastCol: Byte;
SetArrayFormula assigns an array formula to the range. FirstRow, LastRow, FirstCol, and LastCol expose the stored 1-based range bounds, while XFIndex returns the effective classic XLS format index for the range
IXLSRange transfer helpers
procedure PasteFrom(SrcRange: TXLSRange; PasteMode: LongWord; CopyMode: Boolean);
procedure ShiftTo(Row: Word; Col: Byte);
procedure ExtendRange;
procedure ContractRange;
PasteFrom applies cell content from another classic XLS range using the selected paste mode. ShiftTo repositions a range object, while ExtendRange and ContractRange adjust the stored rectangle before range operations that need expanded or normalised bounds
IXLS row and column range interfaces
interface IXLSRowsRange = interface(IXLSRange)
property Item[Row: Integer]: IXLSRowRange;
property Hidden: OleVariant;
property Count: LongWord;
procedure AutoFit(Columns: Boolean = False);
interface IXLSRowRange = interface(IXLSRange)
property Item[Col: Integer]: IXLSColRange;
property Hidden: OleVariant;
property Count: LongWord;
procedure AutoFit(Columns: Boolean = False);
interface IXLSColsRange = interface(IXLSRange)
property Item[Col: Integer]: IXLSColRange;
property Hidden: OleVariant;
property Count: LongWord;
procedure AutoFit(Columns: Boolean = True);
procedure Group(Rows: Boolean = False);
procedure UnGroup(Rows: Boolean = False);
property OutlineLevel: Integer;
interface IXLSColRange = interface(IXLSRange)
property Item[Row: Integer]: IXLSRowRange;
property Hidden: OleVariant;
property Count: LongWord;
procedure AutoFit(Columns: Boolean = True);
procedure Group(Rows: Boolean = False);
procedure UnGroup(Rows: Boolean = False);
property OutlineLevel: Integer;
IXLSRowsRange, IXLSRowRange, IXLSColsRange, and IXLSColRange are returned by IXLSRange.Rows, IXLSRange.Columns, IXLSRange.EntireRow, and IXLSRange.EntireColumn. They keep the normal IXLSRange editing surface while adding indexed row or column access, hidden-state control, counts, autofit, and outline grouping where the range direction supports it
IXLSHyperLink DisplayText property
property DisplayText: WideString;
DisplayText reads or changes the visible text that Excel shows for a classic XLS hyperlink, separately from the target address and screen tip
TXLSWorksheets ID mapping properties
property IndexByID[SheetID: Integer]: Integer;
property IDByName[SheetName: WideString]: Integer;
property NameByID[SheetID: Integer]: WideString;
These read-only lookup properties map between the internal sheet ID, current worksheet index, and visible worksheet name. They are useful when preserving formulas, defined names, or records that refer to sheets by stored identifiers instead of the current tab order
TXLSWorksheet SheetTypeRaw property
property SheetTypeRaw: Byte;
SheetTypeRaw preserves the raw classic XLS BoundSheet8.dt value while loading and saving workbooks, so macro, VBA, worksheet, dialog, and other sheet-type records can round-trip without being flattened to a standard worksheet tab
IXLSPageSetup advanced print properties
property PrintNotesAtEnd: Boolean;
property UseFirstPageNumber: Boolean;
property FirstPageNumber: Integer;
property PrintCellErrors: LongWord;
property PrintResolution: LongWord;
property PrintVResolution: LongWord;
property Copies: LongWord;
property HasSetupRecord: Boolean; read only
property PrinterSettingsInitialized: Boolean; read only
property PrinterDriverData: TBytes;
property HasPrinterDriverData: Boolean; read only
procedure ClearPrinterDriverData;
These properties preserve advanced page setup choices such as comments printed at the end, a custom first page number, printed cell-error rendering, printer resolution, and copy count
HasSetupRecord reports whether a loaded classic XLS worksheet contains a BIFF Setup record, whilst PrinterSettingsInitialized reports whether its paper size, scale, orientation, resolution, and copy count are defined by that record
Saving an untouched worksheet preserves a missing Setup record and an existing record byte for byte; changing a page-setup field creates the record when needed, and changing a printer-dependent field initialises the printer settings
PrinterDriverData reads or replaces the opaque BIFF PLS printer-driver payload, HasPrinterDriverData distinguishes an absent payload, and ClearPrinterDriverData removes it without changing typed page-setup fields
Getter and setter byte arrays are copied so callers and worksheet copies have independent ownership; Classic payloads must include the required two-byte reserved prefix and cannot exceed 1 MiB
SaveXLSWorkbookAsXLSX carries typed page-setup values and the opaque printer-driver payload independently into the XLSX model; typed standard fields remain authoritative when private driver bytes contain duplicate printer defaults
IXLSFont character set properties
property CharSet: Byte;
property Family: Byte;
CharSet and Family expose the classic XLS font character-set and family bytes for callers that need to preserve locale-specific font metadata
TDataToXLS and TGridToXLS Abort methods
procedure TDataToXLS.Abort;
procedure TGridToXLS.Abort;
Call Abort from export event handlers when a running dataset or grid export must stop before completion
Classic XLS reference helper functions
function GetCellRef(Cell: String; var Row, Col: Word): Integer;
function GetCellRange(CellRange: String; var StartRow, StartCol, EndRow, EndCol: Word): Integer;
function EncodeCellRef(Row, Col: Word): String;
function EncodeCellRange(StartRow, StartCol, EndRow, EndCol: Word): String;
function Width2Excel(Value: Single): Word;
function Excel2Width(Value: Word): Single;
function Height2Excel(Value: Single): Word;
function Excel2Height(Value: Word): Single;
function ColIndexToColName(Index: Integer): String;
function ColNameToColIndex(Name: String): Integer;
These helpers convert classic A1 references, ranges, column labels, row or column dimensions, and Excel storage units used by the classic XLS object model