HotXLS Docs

Additional classic XLS API members

This page covers public classic XLS API members that belong to lxHandle, lxDataToXLS, and lxGridToXLS

Concrete worksheet group insertion

TXLSWorksheet.CopyGroup methods copy an existing represented group subtree into an outer worksheet area or into an existing destination parent group, with current typed state and explicit resource and failure boundaries

The methods belong to the concrete TXLSWorksheet class, whilst the existing worksheet members stay unchanged

Batched cell edits

TXLSWorkbook.BeginBatch opens a batch and EndBatch closes it, answering the number of changed cells it folded together; InBatch reports whether one is open, BatchCellCount how many cells it has seen, and the internal TXLSBatchRect record holds one sheet's changed rectangle

Whilst a batch is open, cell changes collect as one bounding rectangle per sheet instead of marking the dependency graph for every cell; EndBatch marks every rectangle just once. A formula structure change inside the batch keeps its usual meaning and invalidates the graph a single time, while writes outside a batch behave exactly as they did

The saving is the per-cell graph lookup: twenty thousand writes into a workbook whose graph holds two thousand ranges take 157 ms unbatch​ed and 15 ms inside one batch on the reference machine, whilst the recalculated values are identical. Batches nest, an empty batch answers zero, and a batch never evaluates anything by itself — call Recalculate afterwards

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 Upper limit on Gauss-Seidel passes for each circular-reference strongly connected component
MaxIterationChange Largest numeric delta tolerated before a circular-reference component halts its iteration
RecalcOnSave Requests workbook recalculation when Excel saves the file
UseFullPrecision Keeps full formula precision; when it is off, formula and What-If data-table caches get 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 stored with the classic XLS file

IXLSWorkbook Close method

function Close: Integer;
      
Closes the workbook object and frees workbook-owned content held by the classic XLS object model

Classic size and row-block APIs

Classic GetSheetNames(FileName, AList) reads through the same record-wise reader as its existing Stream overload; missing-file failure, ZIP dispatch, stream ownership and borrowed-stream cursor behaviour keep their contracts

Low-level serialiser callers can keep the legacy declarations or pick explicit 64-bit aggregate and position helpers

Owner64-bit entryContract
TXLSBlobListTotalSize64: Int64Checked aggregate length; legacy TotalSize: LongWord refuses overflow
TXLSDBCellCreate64, StartRowBlock64, AddRowBookmark64, FinalRowBlock64, DBCellOffset64Internal Int64 positions, with actual relative wire fields checked on emission
TXLSDBCellIndexRegisterRowBlock64, GetData64Checked cumulative INDEX pointer serialisation
TXLSStringTableAddSSTData64Int64 offset plus the existing font-run remap array, with actual ExtSST pointers verified
TCondFormatter and TDataValidatorStore64(DList: TXLSBlobList): Int64Aggregate record lengths without the legacy Integer result width
lxBlob helpersXLSBiffCheckedAdd(Left, Right: Int64): Int64, XLSBiffUInt32(Value: Int64): LongWordReject negative aggregate terms, Int64 overflow and unsigned32 wire values that cannot be represented

Legacy 32-bit counterparts remain available for callers that never go beyond LongWord offsets: TXLSDBCell.StartRowBlock, AddRowBookmark and FinalRowBlock take LongWord positions, the read-only DBCellOffset property gives back the same position as LongWord and rejects a stored Int64 wider than that, BookmarkFirstRow and BookmarkLastRow report the first and last row captured in the current row block, and TXLSDBCellIndex.RegisterRowBlock records a cumulative INDEX pointer with the same LongWord width

Separately named entries preserve the existing value-parameter declarations without bringing in ambiguous Integer/LongWord/Int64 overloads

Legacy Store can serialise records before it discovers that its aggregate return requires Store64; it promises no rollback of a caller-owned list, so use Store64 for new aggregate code

Workbook saving uses its existing staged publication boundary; low-level helpers keep their own partial-list/error behaviour, and changed class layouts require binary consumers to be rebuilt

See wire widths and qualification and bounded sheet-name discovery for measured behaviour and remaining scope

IXLSWorkbook metadata-only loading properties

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 Sheet names to load when the workbook is opened; an empty list pulls in 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 come back 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 map classic row and column metadata onto the shared sparse outline model, derive the requested summary node from its outline direction, and apply compressed hidden and collapse changes with no probing of 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
See Sparse outline geometry for node fields, child modes, examples, and complexity guarantees

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 make up a single logical group, edited groups are written in chunks of at most 1369 areas, and worksheet copies keep 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 the upper and left axes onto 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

IXLSRange array formula and bounds members

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 through 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 wherever the range direction supports it
property DisplayText: WideString;
      
DisplayText reads or changes the visible text Excel shows for a classic XLS hyperlink, kept apart 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, the current worksheet index and the visible worksheet name. They come in handy when preserving formulas, defined names or records that refer to sheets by stored identifiers rather than 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 into a standard worksheet tab

Print areas and titles in copied Classic worksheets

Version 2.384.519 keeps represented local print areas together with repeating row and column titles when a Classic worksheet is copied inside its workbook or into a different workbook, then saved and reopened

The copied ranges belong to the destination worksheet, even for a renamed copy at another sheet index; if the source workbook is released before a file or stream save, no reference to the original sheet is left behind

Print ranges of one or several areas, row titles, column titles and their combinations keep distinct local name identities; a copy of unset print metadata adds no print name

The repair preserves the existing binary name validation and opaque printer data; it does not amount to unrestricted drawing copies, native printing, printer-driver execution or qualification for further platforms

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 keep 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
The arrays returned by the getter and accepted by the setter stay detached, complete values; represented worksheet copies share one immutable source internally and isolate any replacement or clearing, while Classic payloads keep their complete two-byte prefix and may not exceed 1 MiB
SaveXLSWorkbookAsXLSX carries typed page-setup values independently and removes the Classic prefix only from a recognised Windows printer body; unmatched bodies retain same-format preservation and explicitly refuse cross-format conversion, while typed standard fields stay authoritative when private bytes contain duplicate defaults; see printer-setting format boundaries

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 keep 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 has to stop before it finishes

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 and column dimensions, and Excel storage units as used by the classic XLS object model

Version 2.384.405 increment

See the qualified expanded lifecycle and its remaining boundaries for the newer finite contract