HotXLS Docs

Workbook views, connections, and XML Maps

This reference covers editable workbook metadata that sits outside the cell grid and must remain consistent when sheets, ranges, filters and package parts change

Classic custom views

TXLSWorksheet.CustomViews returns TXLSCustomViews, whose Count, Items, Invalidate, and SyncToRaw members preserve typed and unknown custom-view records

TXLSCustomView exposes ViewId, Zoom, GridColorIndex, ActivePane, ShowPageBreaks, ShowFormulas, ShowGridLines, ShowHeadings, ShowOutlineSymbols, ShowZeroValues, CenterHorizontally, CenterVertically, PrintHeadingsexposes PrintGridLines, FitToPage, FilterMode, AutoFilterVisible, FrozenPanes, FrozenNoSplit, SplitVertically, SplitHorizontally, TopLeftRow, TopLeftColumn, SplitX, SplitY, RightPaneColumn, BottomPaneRow, SelectionCount, Selections, HorizontalPageBreaks, VerticalPageBreaks, HasPageSetup, PaperSize, PrintScale, FirstPageNumber, FitToPagesWide, FitToPagesTall, PageSetupFlags, HorizontalResolution, VerticalResolution, HeaderMargin, FooterMargin, Copies, FilterFieldCount, FilterActive, FilterCriteria1, FilterCriteria2, FilterOperators, ClearFilterCriteria, RawRecordCount, RawRecordIds, and RawRecordData

TXLSCustomViewCellRange, TXLSCustomViewCellRanges, TXLSCustomViewSelectionInfo, TXLSCustomViewPageBreak, and TXLSCustomViewPageBreaks carry the selection and page-break payloads owned by a view

XLSX workbook windows

TXLSXWorkbook.WorkbookViews owns ordered TXLSXWorkbookView entries configured by TXLSXWorkbookViewVisibility

TXLSXWorkbookViewAssign, ActiveTab, FirstSheet, Visibility, Minimized, ShowHorizontalScroll, ShowVerticalScroll, ShowSheetTabs, XWindow, YWindow, WindowWidth, WindowHeight, TabRatio, AutoFilterDateGrouping, UnknownAttributes, and Extensions
TXLSXWorkbookViewsAdd, Insert, Delete, Move, Clear, Count, and Items

Sheet insertion, deletion and movement remap every window's active and first-visible tab whilst preserving independent geometry and display settings

Per-pane selections

TXLSXWorksheet.Selections returns TXLSXSelections; TXLSXSelectionPane identifies the target pane and each TXLSXSelection stores Pane, ActiveCell, ActiveCellId, and multi-area Sqref

TXLSXSelection.Assign copies one selection, while TXLSXSelections.Add, AddSelection, Assign, Clear, Delete, IndexOfPane, Count, and Items maintain the ordered sheet-view collection

Connection submodels

TXLSConnection preserves database, web, text, and OLAP metadata. Its web model uses WebParsePre, WebHtmlTables, and WebTables; its fixed-text model uses TextSourceFile and TextFields; its OLAP model uses HasOlapProperties, OlapLocal, OlapLocalConnection, OlapLocalRefresh, OlapSendLocale, OlapRowDrillCount, OlapServerFill, OlapServerNumberFormat, OlapServerFont, OlapServerFontColor, OlapExtraAttributesXml, and OlapChildrenXml

SourceFile stores the top-level connection source while TextSourceFile stores the independent textPr import source; an empty TextSourceFile falls back to SourceFile for compatibility

TXLSWebTableSelectorKind configures TXLSWebTableSelector, whose Kind, Name, Index, ExtraAttributesXml, ChildrenXml, Assign, and Validate members preserve named, indexed, and complete-table selectors

TXLSWebTableSelectors provides Add, AddExisting, Assign, Validate, Delete, Clear, Count, Items, ExtraAttributesXml, and UnknownChildrenXml

TXLSTextImportFieldType configures TXLSTextImportFieldconfigures FieldType, whose Position, ExtraAttributesXml, ChildrenXml, Assign, and Validate members define one fixed-text field

TXLSTextImportFields provides Add, AddExisting, Assign, Validate, Delete, Clear, Count, Items, ExtraAttributesXml, and UnknownChildrenXml

Complete connection members

TXLSConnection common properties are Id, TypeCode, SourceFile, OdcFile, SingleSignOnId, KeepAlive, Interval, BackgroundRefresh, RefreshOnLoad, SaveData, SavePassword, NewConnection, Deleted, OnlyUseConnectionFile, ReconnectionMethod, RefreshedVersion, MinRefreshableVersion, ConnectionString, CommandText, ServerCommandText, CommandType, Parameters, and ExtensionXml

Web properties are WebUrl, WebPost, WebEditPage, WebHtmlFormat, WebXml, WebSourceData, WebConsecutive, WebFirstRow, WebXl97, WebTextDates, WebXl2000, WebExtraAttributesXml, and WebChildrenXml

Text properties are TextSourceFile, TextPrompt, TextDelimited, TextCodePage, TextFirstRow, TextCharacterSet, TextQualifier, TextFileType, TextDecimal, TextThousands, TextTab, TextSpace, TextComma, TextSemicolon, TextConsecutive, TextDelimiter, TextExtraAttributesXml, and TextChildrenXml; database preservation uses DbExtraAttributesXml and DbChildrenXml

TXLSConnections.Assign copies a collection, IndexOfId finds a stable connection identifier, and RootAttributesXml plus UnknownChildrenXml preserve unsupported root content

Connection parameters

TXLSConnectionParameter uses Name, ParameterType, SqlType, RefreshOnChange, Prompt, CellReference, IntegerValue, DoubleValue, BooleanValue, StringValue, ValueKind, ExtraAttributesXml, and Assign

TXLSConnectionParameters provides Add, AddExisting, Assign, Delete, Clear, Count, and Items

Query tables and fields

TXLSQueryTable uses Assign, ConnectionId, ResultTableName, ResultRange, RowNumbers, DisableRefresh, BackgroundRefresh, FirstBackgroundRefresh, RefreshOnLoad, GrowShrinkType, FillFormulas, RemoveDataOnSave, DisableEdit, PreserveFormatting, Intermediate, AutoFormatId, ApplyNumberFormats, ApplyBorderFormats, ApplyFontFormats, ApplyPatternFormats, ApplyAlignmentFormats, ApplyWidthHeightFormats, PreserveSortFilterLayout, FieldIdWrapped, AdjustColumnWidth, HeadersInLastRefresh, MinimumVersion, UnboundColumnsLeft, UnboundColumnsRight, DeletedFields, SortStateXml, ExtensionXml, RefreshExtensionXml, and UnknownChildrenXml, ExtraAttributesXml, RefreshExtraAttributesXml, and RefreshUnknownChildrenXml

TXLSQueryTableField uses Iduses Name, TableColumnId, DataBound, RowNumbers, FillFormulas, Clipped, ExtraAttributesXml, Assign, and Validate

TXLSQueryTableFields provides Add, AddExisting, Assign, FindById, FindByTableColumnId, NextId, Validate, Delete, and Clear; Count copies the worksheet query-table collection Items; TXLSQueryTables.Assign copies the worksheet query-table collection

Explicit query-table refresh

See automatic query providers for explicit refresh without a caller provider, covering registration, native bindings and external-operation limits

TXLSXWorksheet.RefreshQueryTable selects an existing query table by name or by its zero-based collection index and accepts a caller-owned TXLSQueryTableProvider, a positive AMaxRows limit that defaults to 1,000,000 data rows, and an optional TXLSQueryRefreshProgress callback

Implement TXLSQueryTableProvider.Fetch(Connection, Query, MaxRows, out Data, var Abort) to return a TXLSQueryResultData record with ColumnCount and rectangular Rows of scalar Variant values; TXLSQueryResultRow is an array of variants and TXLSQueryResultRows is an array of those rows; rows exclude the existing headers and must match the target width, numeric values, dates, Booleans, strings, errors, empty values and nulls retain their types, and strings beginning with = remain literal values

The provider receives detached connection and query metadata snapshots valid only during the call and must honour the row limit; the library rejects excess rows, ragged matrices, unsupported value types, invalid widths, as well as results outside the 1,048,576-row by 16,384-column worksheet grid without truncation

Refresh preserves existing headers and cell formatting, clears the old data tail of a shrinking result, resizes an attached Excel table and supported filter or sort ranges, updates query-table metadata and invalidates dependent calculations; formulas and styles outside the result area remain unchanged

A disabled query, deleted connection, overlapping merged cells or array formulas, another table or query result, occupied expansion cells, calculated table columns, totals rows, row-number columns, fill-formula behaviour or unbound columns prevents refresh before result cells change

Progress is reported before fetching, before applying results and after each applied or cleared row; set Abort in the provider or progress callback to cancel, and a return value of 1 indicates success, 0 cancellation, and -1 failure, with diagnostic codes 1401 and 1400 identifying cancellation and failure under xlsOperationRefresh

Cancellation or provider, validation, or callback exceptions restore result cells and query or table metadata, including existing cell handles; explicit caller providers own their external access; automatic selection for supported Windows Text, ADO, ODBC and Web queries is available through the workbook dispatcher, and neither opening a workbook nor preserving RefreshOnLoad metadata invokes either provider path

XML Maps and custom XML

TXLSXWorkbook.XmlMaps returns TXLSXXmlMaps, and TXLSXWorksheet.XmlCellBindings returns the sheet binding collection

TXLSXXmlDataBindingStores the relationship identifier and refresh metadata that connects a map to a custom XML part Enabled, DataBindingName, FileBinding, FileBindingName, ConnectionId, DataBindingLoadMode, and ExtensionXml mirror the OOXML dataBinding attributes
TXLSXXmlSchemaStores one schema identifier, namespace, and preserved schema XML Id, SchemaRef, NamespaceUri, Language, and Xml round-trip the schema part
TXLSXXmlMapStores map identity, root element and namespace, and its DataBinding; import behaviour is configured by RootElement, SchemaId, ShowImportExportValidationErrors, AutoFit, Append, PreserveSortAFLayoutStores map identity, root element and namespace, and its PreserveFormat
TXLSXXmlMapsAddSchema, AddMap, FindSchema, FindMap, DeleteSchema, DeleteMap, Clear, Validate, SelectionNamespaces, and SchemaCount, Schemas, and MapCount
TXLSXXmlCellBindingMaps one worksheet range to an XPath and XML map identifier; CellReference, XPath, XmlDataType, MapId, XmlCellPropertyId, ConnectionId, and UniqueName Maps one worksheet range to an XPath and XML map identifier
TXLSXXmlCellBindingsAdd overloads, Delete, Clear, Validate, Count, and Items
TXLSXCustomXmlPartAddSchemaRef associates a custom XML item with a schema reference; Xml holds the item payload, ItemId the data-store item identifier, and SchemaRefs associates a custom XML item with a schema reference

Advanced clone, HTML, and image members

TXLSXRangeClonePart, TXLSXRangeCloneParts, and TXLSXRangeCloneSourceCounts define dependency-aware range cloning. TXLSXWorksheet.CaptureRangeCloneSourceCounts, AuthorizeRepeatedDisjointRangeClones, ResizeTableRows, and TileRangeAxisMetadata are advanced structural-edit hooks used by compiled report expansion and by custom participants

TXLSXHtmlExportSessionState describes TXLSXHtmlExportSession; use BeginExport, ExportNextSheet, and Reset, then inspect State, Active, ExportedSheetCount, and TotalSheetCount. Set TXLSXHtmlExportOptions.IncludeDrawings to render supported worksheet objects into the HTML session

TXLSXImage exposes Gamma, ShadowColor, ShadowOpacity, ShadowBlur, ShadowOffsetX, and ShadowOffsetY for shared PDF, SVG, HTML, bitmap, and metafile rendering

See also