HotXLS Docs

Typed nested Classic drawing groups

Import, edit and save an existing nested hierarchy

Classic XLS imports the qualified nested OfficeArt group profile into typed parent/child objects and saves the real hierarchy by way of the bounded drawing transport

The representative Excel-authored input has two user groups, rectangle, textbox and picture leaves, and a separate ungrouped rectangle; the worksheet patriarch stays a distinct internal owner

The supported transform subset is axis-aligned, unrotated, unflipped and nondegenerate, with signed local coordinates, nonzero coordinate origins and positive non-uniform scaling

Read the hierarchy without changing leaf enumeration

APIBehaviour
TXLSShapes.Count and ItemsKeep the existing leaf-only enumeration, including leaves inside groups
TXLSShapes.GroupCount and Groups[Index]Enumerate typed user-group wrappers separately, using 1-based indexes
TXLSShape.ParentGroupReturns the containing user group, or nil for an outer group or ungrouped leaf
TXLSShapeGroup.ChildCount and Children[Index]Expose ordered direct children with 1-based, read-only indexed access; a child may itself be a group
TXLSShapeGroup.CoordinateBoundsReads the retained FSPGR child-coordinate domain without replacing it
TXLSShape.HasLocalBounds and LocalBoundsReport parent-local placement; reading LocalBounds without such placement raises an EInvalidOperation

TXLSShapeLocalRect has signed 32-bit Integer fields Left, Top, Right and Bottom; local placement and the group's child-coordinate domain are distinct rectangles

Collection and child references are borrowed from the owning workbook; retain the workbook and reacquire wrappers after any operation that replaces its drawing model

Local placement and outer worksheet placement

  1. Open a supported XLS input and fetch an existing group through Groups, then inspect its ordered Children and ParentGroup links
  2. Use SetLocalBounds(ALeft, ATop, ARight, ABottom) for a child leaf or nested group, keeping a positive local rectangle
  3. Use TXLSShapeGroup.SetArea(ARow1, ACol1, ARow2, ACol2) for an outer user group where ParentGroup=nil
  4. Save and reopen the workbook to keep the hierarchy, local coordinates, edited content and regenerated drawing identities

SetArea takes 1-based rows 1..65536 and columns 1..256, requires Row2>Row1 and Col2>Col1, and resets fractional offsets to zero

Width and Height read effective dimensions through the current parent transform chain and worksheet geometry callbacks; their setters refuse groups and grouped children because such edits would be ambiguous

Real placement edits acquire the existing workbook write guard after validation; a same-value placement no-op needs no write lease

Finite input admission

Known structural records must belong directly to their actual shape owner, with the required group header and unique drawing and host object IDs; malformed cardinality, contradictory object roles and grouped comments are refused

Outer worksheet anchors require checked positive endpoint spans, columns 0..255 and inclusive fractional offsets 0..1024 horizontally and 0..256 vertically; this finite admitted subset is not a description of every valid OfficeArt anchor

Connectors, opaque solver-bearing grouped drawings, rotation and flips remain outside the profile; save planning checks these constraints once more after edits

Copying and topology boundaries

The finite grouped worksheet-copy profile covers same-workbook and cross-workbook AddCopy with current typed state, image identities and text-run fonts; finite selected-group insertion is available through the concrete worksheet API, whilst general solver or unknown-reference remapping remains separate work

Deleting a group or grouped child refuses; TXLSShapes.Delete and DeleteInRange refuse whenever the collection contains groups, even when the requested range lies outside them

An individual ungrouped outside leaf can still be deleted through its own Delete method; creating arbitrary group topology, reparenting and subtree deletion are outside this increment

A failed Workbook.Open retains its existing reset behaviour; this drawing profile adds no whole-workbook transactional-open guarantee

Acceptance and its limits

The final 2.384.349 source passes 119 representative Win64 checks using one cold build and four guarded reuses of the same source, plus independent decoding of ten final output profiles

The three positive final outputs have exact equality of every complete CFB stream to the corrected candidate and its earlier inputs observed by actual Excel in 60 checks; container bytes can differ and no further native run is claimed

Excel opens and saves the qualified files and checks content, picture availability, fill and geometry; nested structure is independently established from the actual wire because COM GroupItems can expose descendant leaves with no intermediate group node

Fixed 47-node library-only payload growth from 64 KiB to 4 MiB retains Open peak 270984 bytes, Save peak 220464 bytes and largest request 65552 bytes in the final controls; unknown payloads bring no native qualification

These are incremental Pascal allocation observations, not arbitrary-node memory bounds, native RSS, rendered appearance, pixel parity or a fresh compiler/platform matrix

The remaining mandatory storage, mixed-copy, wide typed metadata and inherited-resource domains in compound storage remain open