Materialized XLSX drawing groups

Version 2.384.520 adds local transform editing for supported retained OOXML drawing groups, including nested groups, chart and image occurrences and retained shape XML

Materialization gives each occurrence an explicit local coordinate space and preserves its existing chart or image payload identity; it does not flatten the complete group into unrelated standalone objects

Entry points and occurrence identity

function TXLSXWorksheet.MaterializeDrawingObject(Index: Integer): TXLSXDrawingObject;
function TXLSXWorksheet.GroupDrawingObjects(const Indexes: array of Integer): TXLSXDrawingObject;
function TXLSXWorksheet.UngroupDrawingObject(Index: Integer): Integer;

Index identifies a top-level entry in DrawingObject; materialization prepares the complete selected tree before publishing it and returns the original root instance

Materialized reports the represented occurrence state, Parent and Children describe its actual hierarchy, and Chart or Image continues to identify the same typed payload

The appended xlsxDrawingShape kind represents residual shape XML with a local transform; this does not imply that every residual shape has a modeled TextBox or a complete shape-specific editing API

RawXml reflects the retained occurrence and its current transform, with its XML namespaces and residual content preserved

Local transforms and units

TXLSXDrawingTransform = record
  Present, GroupCoordinates, RotationPresent, FlipHPresent, FlipVPresent: Boolean;
  OffsetX, OffsetY, ExtentX, ExtentY: Int64;
  ChildOffsetX, ChildOffsetY, ChildExtentX, ChildExtentY: Int64;
  Rotation: Integer;
  FlipH, FlipV: Boolean;
end;

Read and write the record through Drawing.Transform; offsets and extents are local drawing coordinates in EMUs, with 12,700 EMUs per point

A group's child offset and child extent define the mapping from its child coordinate space to its outer extent; use the complete group transform rather than treating a nested child's offset as a worksheet position

Rotation is expressed in 60,000ths of a degree, while the presence flags retain the distinction between absent attributes and explicitly stated zero rotation or false flips

Read, modify and assign the existing record so unrelated coordinates and attribute-presence flags remain intact; invalid or noninvertible represented transforms are refused

Root := Sheet.MaterializeDrawingObject(0);
Transform := Root.Transform;
Inc(Transform.ChildOffsetX, 1270);
Root.Transform := Transform;

Child := Root.Children[0];
Transform := Child.Transform;
Inc(Transform.OffsetX, 12700);
Child.Transform := Transform;

These local transforms have a separate ownership contract from legacy worksheet-position setters; do not assume that an inherited Left, Top or size setter edits the represented local transform

Splitting, regrouping and rollback

A supported split retains the parent's coordinate mapping in explicit compensation wrappers, exposed through TransformWrapper, instead of dropping that mapping when its children become roots

Regrouping materialized roots that share an exact anchor context preserves that original context, including an implicit worksheet grid; distinct absolute anchors can be combined using their exact EMU rectangles

Regrouping roots with different cell-anchor contexts requires an additional exact worksheet-grid mapping and is currently refused before publication rather than converted using approximate row or column distances

The inverse of a neutral regroup restores the previous root occurrences and their local transforms; ordering, typed resources and parent links remain part of the transaction

Preparation or publication failure restores the previous occurrence graph, raw-anchor ownership and model generation so the same instances can be retried

Copying and saving

Sheets.AddCopy copies the complete materialized occurrence graph, owned chart and image resources, retained XML and namespace context, target identities and relationship aliases

The copied worksheet remains saveable after the source workbook is released; same-workbook copying retains unrelated worksheet, table and defined-name dependencies while rebinding names owned by the copied root

XLSX output writes one current occurrence for each materialized root and retires its old raw slot, while preserving other retained raw occurrences and their rebased ownership

After reopening the physical XLSX, use MaterializeDrawingObject again when further local transform editing is required

Copied worksheet column grids

Copied OOXML worksheets retain their source base column width and Normal-font width context when explicit or implicit column widths must be written for the destination workbook

This avoids changing the native width simply because the destination Normal font differs, and avoids inventing an explicit default width from a generic character-width estimate

Representative Windows Excel acceptance covers the shared-anchor edit, split, regroup, inverse and source-free copy sequence, plus scalar worksheets using Calibri 18 and Consolas 11 Normal-font contexts

This does not qualify arbitrary subsequent font mutation, every theme or font-substitution profile, or a universal grid mapping for different cell anchors and portable rendering

Copied worksheet default row formats

Version 2.384.521 preserves StandardHeight together with CustomHeight, ZeroHeight, OutlineLevelRow and OutlineLevelCol through worksheet copy preparation and transactional publication

A numeric default row height alone does not establish a manually fixed height: native consumers can recompute it when the associated manual-height flag is missing

Copies retain the default flags through failed-publication rollback, same-instance retry, source workbook release, saving and physical reopening

Actual Windows Excel acceptance covers ten source-free copies with fixed and fractional default heights, individual hidden rows and columns, variable sizes and one-cell drawing anchors, preserving the complete typed leaf geometry and chart contents at the original tolerance

Default-hidden-row and outline-level retention additionally has model and saved-XML verification, including failure rollback; this is separate from complete native qualification of every default-hidden-row layout

Automatic row-height calculation and exact mappings between different cell anchors remain separate work; this copy repair does not widen the regroup profiles described above

Default-hidden rows and explicit visibility

Version 2.384.528 preserves the distinction between a worksheet's default-hidden state and each stored row's visibility When reading XLSX, an absent row inherits ZeroHeight, while a present row with an omitted, zero or false hidden attribute remains visible An explicit true hidden attribute keeps that row hidden, including rows with a declared height

RowHidden reports this effective visibility Setting it to false retains an explicit visible row even when the worksheet default is hidden Enabling ZeroHeight preserves the visibility of existing stored rows and applies the hidden default to newly represented rows ClearRowHidden restores a visible default and clears hidden row state while retaining actual stored empty-row presence

These visibility owners follow worksheet copying, row insertion and deletion, metadata tiling, supported transactional rollback, saving and reopening Filter application that resets visible matches can keep those matches visible under a hidden worksheet default

The change does not calculate automatic text heights, define application font fallback, or admit regrouping between different cell-anchor grids

Loaded automatic row-height caches

Version 2.384.523 preserves the distinction between an XLSX row's cached height and a manually fixed height when customHeight is missing or false

The automatic-height state follows its row through saving, physical reopening, worksheet copies, row insertion/deletion, metadata tiling and publication rollback, while explicitly setting or clearing a row height updates that state with the numeric owner

RowHeight continues to return the declared or cached number; this preservation does not turn that getter into a universal native automatic-height calculator

For example, a stored 24-point cache with a false manual-height flag can display at 14.4 points in an actual consumer; saving it as manually fixed changes the grid and anchored objects

Actual Excel checks cover missing, zero and false flag forms, fixed-height controls, mixed automatic/manual rows, source-free copies and repeat saving, including complete row-height vectors and typed drawing geometry

Conversions that require fixed geometry exclude automatic cache values from their fixed-row evidence until the actual text-layout owner is available; general ODS optimal-row-height mapping, XLSB cache-height representation and different-cell-anchor regroup remain separate work

OpenDocument projection of current occurrences

Internal version 2.384.859 adds OpenDocument output for bounded materialized image and plain-text occurrences, including nested axis-aligned image groups and workbooks that also contain retained raw groups

The conversion uses each occurrence's current worksheet anchor, local transform and complete parent mapping; legacy image position fields do not override that materialized geometry

Supported worksheet roots retain their actual cell host and offsets, or a bounded nonnegative absolute position; nested image scaling must resolve to exact representable target lengths

Plain text retains its represented uniform typography and paint through the existing text-box conversion profile; nonunit parent scaling of text requires further typography support and is refused

Use GetConversionReport(xlsConversionOpenDocument) before choosing SaveAsChecked policy: two-cell resizing becomes a fixed current frame, nonvisual metadata may be omitted, and a standalone materialized picture uses a neutral target group to retain exact frame lengths

The report identifies the added group as a change to target grouping and editing structure, while retaining the picture name, media occurrence, cell host and drawing order

Checked saving with AAllowLossy=False refuses reported losses; enabling lossy output still refuses unsupported effects, rotations, flips, charts, connectors, crops, SVG companions, camera ranges, unowned metadata and nonexact geometry

File and stream saves consume the checked prepared target representation, revalidate source state after callbacks and before publication, and leave the original occurrence tree available for subsequent XLSX output

Supported empty preset ellipses additionally retain their actual ellipse identity, explicit fill and outline paint, represented outline width and exact nested geometry through OpenDocument conversion

Current boundaries

Inherited group properties that cannot be partitioned, nonvisual dependencies, richer effects and transforms, connector and creation identities and wider vendor-specific contexts need further ownership support

OpenDocument support is limited to the occurrence projection above; wider XLSB, semantic-snapshot and portable-rendering projections retain their separate ownership requirements and unsupported conversions are refused without replacing checked output destinations

Existing supported raw drawing conversion profiles remain separate; successful materialization is not evidence that every retained raw group can be split, converted or rendered

See owned drawing groups in XLSB for that format's separately qualified profiles and qualified defined-name validation for copied formula dependencies