Documentazione HotXLS

Additional classic XLS API members

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

IXLSWorkbook calculation properties

property CalculationMode: LongWord;
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
EnableIteration Enables iterative calculation for circular formulas
MaxIterations Maximum iteration count used when iterative calculation is enabled
MaxIterationChange Maximum accepted calculation delta before iteration stops
RecalcOnSave Requests workbook recalculation when Excel saves the file
UseFullPrecision Keeps full precision rather than applying displayed precision to stored values

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 e write the workbook summary information fields saved with the classic XLS file

IXLSWorkbook Close method

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

TXLSWorksheet pane e print-title methods

function ThawPanes(Y, X: Single; RowTop, ColLeft: Word): Integer;
function SplitPanes(Width, Height: Single): Integer;
function UnsplitPanes: Integer;
function RepeatRows(FirstRow, LastRow: Word): Integer;
function RepeatColumns(FirstCol, LastCol: Word): Integer;
      
ThawPanes, SplitPanes, e UnsplitPanes control split-pane state, while RepeatRows e RepeatColumns set print-title rows o columns for the worksheet

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 e returns the created TDataValidation instance so prompt, error, e 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;
      
Usa AddPivotTable to create a typed pivot table from a source range, then use PivotTables e PivotSetDataFieldFormat to inspect o format the generated model. Vedere Classic XLS pivot table API

IXLSRange array formula e 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, e 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 e ContractRange adjust the stored rectangle before range operations that need expanded o normalized bounds

IXLS row e 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, e IXLSColRange are returned by IXLSRange.Rows, IXLSRange.Columns, IXLSRange.EntireRow, e IXLSRange.EntireColumn. They keep the normal IXLSRange editing surface while adding indexed row o column access, hidden-state control, counts, autofit, e outline grouping where the range direction supports it
property DisplayText: WideString;
      
DisplayText reads o changes the visible text that Excel shows for a classic XLS hyperlink, separately from the target address e 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, e visible worksheet name. They are useful when preserving formulas, defined names, o records that refer to sheets by stored identifiers instead of the current tab order

TXLSWorksheet SheetTypeRaw proprietà

property SheetTypeRaw: Byte;
      
SheetTypeRaw preserves the raw classic XLS BoundSheet8.dt value while loading e saving workbooks, so macro, VBA, worksheet, dialog, e 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;
      
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, e copy count

IXLSFont character set properties

property CharSet: Byte;
property Family: Byte;
      
CharSet e Family expose the classic XLS font character-set e family bytes for callers that need to preserve locale-specific font metadata

TDataToXLS e TGridToXLS Abort methods

procedure TDataToXLS.Abort;
procedure TGridToXLS.Abort;
      
Chiama Abort from export event handlers when a running dataset o 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 o column dimensions, e Excel storage units used by the classic XLS object model