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 through 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 remains a distinct internal owner

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

Read the hierarchy without changing leaf enumeration

APIBehavior
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 can 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 EInvalidOperation

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

Collection and child references are borrowed from the owning workbook; retain the workbook and reacquire wrappers after operations that replace its drawing model

Local placement and outer worksheet placement

  1. Open a supported XLS input and obtain 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, preserving a positive local rectangle
  3. Use TXLSShapeGroup.SetArea(ARow1, ACol1, ARow2, ACol2) for an outer user group with ParentGroup=nil
  4. Save and reopen the workbook to retain the hierarchy, local coordinates, edited content and regenerated drawing identities

SetArea uses 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 those edits would be ambiguous

Real placement edits acquire the existing workbook write guard after validation; a same-value placement no-op does not require a 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 refuse

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 does not describe every valid OfficeArt anchor

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

Copying and topology boundaries

The finite grouped worksheet-copy profile supports 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, while 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 a 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 not provided by this increment

A failed Workbook.Open retains its existing reset behavior; 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 same-source reuses, 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 additional 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 without an 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 add no native qualification

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

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