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

Validation failures raise EXLSConnectionModel: a selector index below one, a selector with no name or index, a text field with a negative position, a connection Id at or below zero or already in use, a Name outside 1–255 characters or duplicated, a Description over 255 characters, a TypeCode outside the supported set, a refresh Interval outside 0–32767, versions outside 0–255, a metadata snapshot over its budget, or a type that is unsupported at save time

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

Write actual text into schema-defined Office string fields across represented connection and QueryTable metadata; the XML serializer handles Office string escaping, so literal text such as _x000D_ or _x005F_x000D_ stays literal, whilst actual carriage returns, tabs and ampersands hang on to their distinct values through XML saving and reopening

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, and TXLSQueryTables.DoChanged(Sender) fires the collection's OnChange notification when one of its query tables reports a change

TXLSQueryTable.DeletedFields writes represented entries under the canonical queryTableDeletedFields container; recognised historical deletedFields metadata stays readable, whilst saving a represented list uses the canonical spelling

Deleted names keep their literal text, list order and repeated values; an explicitly empty name goes out with name="" rather than being left out, whilst a missing required name attribute is turned away; a typed deleted list with no current fields still carries the required empty queryTableFields container before the deleted metadata

For recognised deleted-field metadata, duplicate recognised containers, canonical/legacy mixtures and conflicts between represented entries and opaque refresh containers are refused rather than combined; an incompletely modeled deleted container is retained whole only within the finite preservation contract, and unsupported namespace or mixed-content structures are explicitly refused

Reading an opaque deleted-field subtree is limited to 64 levels

Finite XLSB QueryTable metadata transport

The ordinary XLSX model can spell out more query-table and field settings than the finite XLSB transport profile admits

The represented binary graph takes the existing Web TypeCode=4 profile plus standalone ODBC TypeCode=1 or OLE DB TypeCode=5 SQL or Table connections carrying CommandType=2 or CommandType=3, an exact worksheet-local ResultRange and a live ConnectionId that matches

Result tables, refresh-field collections, OLAP settings, unknown active extension owners and unresolved source or destination identities stay checked conversion boundaries

Transporting connection and QueryTable metadata carries represented cached results over without calling RefreshQueryTable; built-in provider activation and explicit data-source access remain under their separate edition and application controls

The existing XLSB Web connection bridge upholds the same text distinctions for its supported properties; XML parameter, text-import and OLAP metadata and nonempty QueryTable field collections keep their existing binary-conversion restrictions

Destination projection during save

An admitted fresh standalone QueryTable with an explicit local ResultRange and no existing destination name serialises a visible local name without adding it to the live DefinedNames collection as a save side effect

Repeated save and formula-metadata preview share the same prepared destination identity; existing explicit or imported names keep their own visibility and source ownership, and an unrelated name collision is turned away

The finite XLSB profile also ferries represented scalar settings for an empty refresh owner, taking in NextId, persistence, prior-header and unbound-column settings, whilst nonempty field collections, deleted fields and active sort state stay outside that profile

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