Portable headless output
With you since version 2.384.100 as a bounded output pipeline with explicit capture and rendering APIs
Capture a supported rectangle from a Classic XLS or XLSX workbook on Windows, transfer the immutable snapshot, then render PDF, SVG or PNG on Linux or macOS with Free Pascal and native Cairo
The capture adapter runs on the workbook engine; Windows capture uses its default geometry service, whilst native Linux and macOS capture can bring an explicit FreeType/HarfBuzz geometry service backed by application-selected font files
The separate native consumer takes lxPortableRender scenes via lxPortableCairo, with no Excel or desktop session in sight; its geometry API likewise uses the existing portable workbook-view and render-geometry units
The consumer takes an immutable scene or transfer stream; platform requirements for loading and calculating workbooks are covered separately in Free Pascal support
Capture an existing workbook rectangle
CaptureXLSPortableRenderSnapshot in lxPortableWorkbookCapture takes an IXLSWorkbook or IXLSXWorkbookOwner with explicit or default TXLSPortableRenderLimits; two further overloads take explicit limits followed by an IXLSRenderGeometry provider scoped to the capture view
SheetIndex and the inclusive Row1, Col1, Row2, Col2 are one-based; the resulting snapshot keeps zero-based positions relative to the captured rectangle
program CaptureRectangle;
{$APPTYPE CONSOLE}
uses SysUtils, Classes, lxHandleX, lxPortableRender,
lxPortableWorkbookCapture;
var
Workbook: TXLSXWorkbook;
Owner: IXLSXWorkbookOwner;
Snapshot: IXLSPortableRenderSnapshot;
Stream: TFileStream;
begin
Workbook := TXLSXWorkbook.Create;
Owner := Workbook;
if Workbook.Open('report.xlsx') <> 1 then
raise Exception.Create('Cannot open report.xlsx');
Snapshot := CaptureXLSPortableRenderSnapshot(Owner, 1, 1, 1, 30, 6);
Stream := TFileStream.Create('report.hxrs', fmCreate);
try
SaveXLSPortableRenderSnapshot(Snapshot, Stream,
XLSDefaultPortableRenderLimits);
finally
Stream.Free;
end;
Owner := nil;
end.
Keep the owner interface alive for as long as you use the workbook object; release the interface rather than manually freeing an interface-owned workbook
For Classic XLS, use TXLSWorkbook and IXLSWorkbook out of lxHandle with the same capture call
Capture reads the existing formula caches and refuses any formula in the rectangle lacking a cache; it never recalculates implicitly, fetches external data or interns new styles in the source workbook
Recalculate explicitly before capture whenever your application needs fresh formula results; an existing cache is rendered exactly as stored, so capture vouches nothing for its freshness
The operation holds a read view and checks the workbook generation before handing back; the returned snapshot is detached from workbook ownership and stays usable once the workbook is released
Appearance and capture boundaries
Portable capture fits ordinary unrotated General-format numbers to the measured cell width by trimming precision, falling back to scientific notation when needed, or showing overflow markers. The snapshot carries the resulting display text, leading minus sign included when a narrow column reduces a small negative value to zero
The snapshot holds formatted display text, physical dimensions in points, resolved RGB colours, supported cell fonts and alignments, fills, borders and complete merged rectangles; hidden rows and columns have zero size
Supported font appearance covers bold, italic, single underline and strikeout; supported cell appearance covers solid fills, left/centre/right horizontal alignment, top/centre/bottom vertical alignment, wrap, shrink and right-to-left reading order
Thin, medium, thick, hair, double, dotted, dashed and medium-dashed workbook borders map onto the portable border styles and point widths; other border styles are refused
Supported rich text carries effective run fonts, point sizes, RGB colours, bold, italic, single underline, strikeout and run-level superscript or subscript; plain cell outline/shadow/vertical font effects, unsupported underline styles, gradient or patterned fills, diagonal borders, indent, text rotation and unsupported alignments are refused
A capture rectangle must take in every merged cell completely; clipped, overlapping or inconsistent merges and incompatible styles along a merged outside edge are refused
Sheet backgrounds and unsupported sheet kinds sink the capture; supported PNG/JPEG images and ordinary rectangle/ellipse text shapes in both workbook facades are captured as ordered scene objects, alongside XLSX cell images, Boolean checkboxes and the supported cached XLSX chart subset described below; unsupported charts, shape presets, WordArt, grouped transforms, floating controls, Slicers, Timelines and sparklines are refused when their resolved footprints intersect the rectangle
Ordinary two-cell XLSX rectangle and ellipse shapes can inherit a solid fill, a supported outline and a Latin typeface and colour from the workbook theme. Explicit shape paint takes precedence. Theme gradients and nonempty effects sit outside this shape capture profile
Unsupported content with a reliably resolved footprint outside the rectangle can coexist with capture; an unresolvable drawing footprint is refused rather than silently dropping potentially overlapping content
Classic table styling intersecting the rectangle is refused; XLSX built-in and supported custom Table sections are resolved in detached style context, with section-sized stripes and direct cell format overrides
For supported imported Table solid or implicit differential fills, RGB bgColor provides the visible background; RGB fgColor on its own leaves the inherited background alone, and a section carrying both colours uses its background colour
Imported Table sections carrying appearance the typed summary cannot represent are refused when that section applies, underline, number formats, explicitly cleared bold/italic, font schemes, an explicit no-fill pattern and unsupported colour forms included; an unrelated section outside the captured rectangle does not block capture
Supported conditional formatting is applied with no formula evaluation: cached numeric or date comparisons against literal numeric bounds, literal Boolean or numeric expressions, text containment/prefix/suffix rules, blanks and errors; higher-priority appearance wins per supported property, and XLSX StopIfTrue halts lower-priority matching rules
Classic text rules call for a literal string needle and match cached string cells; XLSX text rules work from their stored text criteria
Supported differential appearance covers resolved theme colours with tint and plain indexed colours; imported automatic colours, non-theme tint, a differential fill carrying both foreground and background colours, and unsupported border, alignment, strike or other unrepresented differential appearance are refused when the matching rule applies
Conditional formulas needing evaluation, aggregate or date-dependent rules, colour scales, data bars and icon sets are refused wherever encountered; overlapping conditional-format rule counts are bounded
Date1904 conversion picks the applicable raw numeric-format section before applying the calendar offset; inactive calendar sections leave ordinary numeric display alone, and Boolean values remain Boolean
A selected Date1904 calendar section combined with format conditions or elapsed-time constructs is refused; quoted or escaped section separators are likewise refused, and this boundary does not block a selected ordinary numeric section just because another section happens to be a calendar format
Cell layout and ordinary font effects
Indentation allows three spaces in the workbook Normal font per source level, as measured by the supplied capture geometry; Classic capture resolves the built-in Normal STYLE binding instead of assuming a fixed XF index
Contextual reading order settles the first strong character once per paragraph and keeps that base across wrapped fragments; a neutral paragraph falls back to the sheet reading order
Rotated text shapes in local coordinates and clips to the physical cell rectangle; borders stay in physical coordinates, and shrink works from the projected text bounds
Stacked text keeps upright supported grapheme clusters; wrapped columns use the available cell height and flow from right to left, with bounded shaping, line and temporary-array work
| Symbol | Contract |
|---|---|
TXLSPortableCell.IndentPoints | Finite nonnegative physical inset in points from the chosen left or right edge; zero keeps the existing placement and nonzero centre indentation rejects |
TXLSPortableCell.TextRotation | Signed -90..90 degrees, positive anticlockwise;255 selects upright stacked text; other values reject |
TXLSPortableCell.ContextReadingOrder | When true, take the paragraph base from the first strong character, falling back to RightToLeft; when false, use the explicit RightToLeft |
TXLSPortableCell.DiagonalUp, DiagonalDown, DiagonalBorder | Up draws bottom-left to top-right, down draws top-left to bottom-right; both use the shared border style, width and RGB colour; a visible diagonal needs at least one direction |
TXLSPortableCell.HasFillCharacter, FillCharacter, FillCharacterIndex | The repeat character of a *x number format and the number of Text characters before the repeats; the text before them starts at the left edge, the rest ends at the right edge, and the native layout repeats the character as many whole times as fit, with Excel's placement of the leftover space for each horizontal alignment; rotated text fills the longest line whose rotated box fits the cell width and height, stacked text repeats the character as many times as fit the height, text centred across columns fills the whole span, right-to-left cells keep the parts in left-to-right order, and in multi-line text the repeats go in the line holding the position whilst the other lines count against the width; shrink-to-fit text keeps the ordinary layout, as in Excel. The character is one printable UTF-16 unit between whole characters of Text; when absent all three are zero, and scene text rejects them |
TXLSPortableCell.AlignmentSpanToLeft | When true the AlignmentSpanColumns run ends at the right edge of the cell instead of starting at its left edge, as centring across a selection does on a right-to-left sheet; it needs a nonzero span that fits to the left of the cell and is rejected on scene text. Capture of a right-to-left sheet mirrors the column order and the left and right borders and sets it for centred-across runs |
TXLSPortablePrintOptions.RightToLeft | The snapshot is a right-to-left sheet with mirrored columns: column bands are laid out from the right, each page sits against the right margin with repeated columns and row headings on the right, and column headings are labelled from the right; column breaks, repeated columns, print areas and comment cells stay in sheet order. The workbook print adapters take their setting from the sheet direction |
TXLSPortableCell.TextOverflows | The text is a string value; on one unwrapped, unrotated line in a single cell aligned left, right or centre, the native layout lets it run on into neighbouring columns of its row up to the first cell with text or a merged range, centred text staying centred on its cell and cut off at a blocked side, and printed vertical gridlines inside that run are left out. Capture sets it for string values; scene text rejects it |
IXLSPortableCellAlignmentSource | Optional read-only workbook-view bridge implemented by both workbook facades |
ReadPortableIndentPoints(Level, MaxSteps, MaxBytes) | Hands back the explicit geometry-context indentation within positive source lookup and byte limits; invalid levels or an invalid Classic Normal identity reject |
xpfsAccountingUnderline, xpfsDoubleAccountingUnderline | Single or double full-frame accounting lines chosen by the cell base font; a later partial rich run alters its metrics without creating a whole-cell line |
xpbsDashDot, xpbsDashDotDot, xpbsSlantDashDot | Additional cell border patterns with explicit width and colour; slant segment work is checked before drawing and tiny unsafe widths reject |
Full-cell superscript/subscript uses the same two-thirds size and one-third baseline shift as rich runs, whilst preserving the base font line box; accounting behaviour follows base-font identity rather than applying a whole-cell line for every partial run
Incompatible merged-member diagonal styles, directions or colours reject; monochrome projects diagonal colours and draft omits diagonal borders under the same policy as cardinal borders
Ordinary Fill, Justify, CenterContinuous and Distributed alignments, including Distributed indentation and vertical Justify/Distributed, are covered below
The appended enum values preserve existing ordinals, but the record layouts have expanded, so applications consuming the records must rebuild; new layout fields may be used on text scene objects and reject on nontext objects, whilst the new border patterns remain cell-only
Explicit fonts and the capture geometry determine distances; native printer defaults can yield different physical metrics, so these semantics promise no pixel-identical printer output
Ordinary patterned cell fills
Classic XLS and XLSX capture preserve all seventeen non-solid ordinary cell patterns, including patterned cells that carry no text; the resolved foreground and background RGB colours belong to the detached snapshot
| Field | Contract |
|---|---|
TXLSPortableCell.FillPattern | xpfSolid is ordinal 0 and keeps existing solid behaviour; non-solid values are xpfGray125, xpfMediumGray, xpfDarkGray, xpfLightGray, xpfDarkHorizontal, xpfDarkVertical, xpfDarkDown, xpfDarkUp, xpfDarkGrid, xpfDarkTrellis, xpfLightHorizontal, xpfLightVertical, xpfLightDown, xpfLightUp, xpfLightGrid, xpfLightTrellis and xpfGray0625; the field's type is TXLSPortableFillPattern |
FillColorRGB, FillBackgroundColorRGB | Independent resolved foreground and background colours for non-solid patterns; FillColorRGB stays the solid colour for xpfSolid |
HasFill | False suppresses all fill ink without erasing dormant pattern metadata; Mono and Draft projections keep this behaviour |
TXLSPortableCairoOptions.PatternDPI | Finite 36..2400, default 600 pattern pixels per 72 worksheet logical points ahead of the common print-page scale; independent of RasterDPI |
Each8 by8 tile repeats every 8*72/PatternDPI worksheet points, or 0.96 point at the default resolution and 100% scale; tiles share the worksheet origin, use nearest-neighbour sampling and stay clipped to each physical cell rectangle
The renderer does not infer device resolution or change printer settings; an independent native Zoom50 export doubled both its MediaBox and tile period whilst preserving approximate cell widths, so the observed normal-scale mask agreement does not establish physical printing equivalence
Each active non-solid fill reserves 4352 layout bytes before allocating its 256-byte tile and a conservative 4096-byte backend envelope; the pre-scan charges 64 pixel preparations and the final work bound also covers cell drawing and existing page phases
Dormant patterns allocate no tile and consume no pixel-preparation work; invalid pattern ordinals, background colours, DPI and unsupported scene-text pattern state reject before a prepared layout or snapshot is published
Snapshot9 appends two unsigned32-bit fields after each version8 cell payload: the pattern ordinal and background RGB; earlier solid records keep their lowest compatible binary version, and failed reads restore the input position
Dependent consumers must rebuild for the expanded public cell and options records; source distributions need to include lxPortablePatternMasks.inc
Conditional pattern and gradient fills use the profiles below; further calculated and aggregate conditional appearance remains separate work; modern icon sets use the bounded profile below; modern colour scales and data bars use the bounded profiles below
Conditional pattern fills and partial colors
Modern XLSX and Classic XLS portable capture support all seventeen conditional pattern families, explicit none and solid fills, including matching rules on cells that carry no text; the detached snapshot and Cairo output reuse the ordinary pattern engine and the existing snapshot format
Pattern, foreground and background have independent priority ownership, so a higher colour-only rule can keep the ordinary pattern or combine with a lower matching pattern; a non-solid pattern-only rule supplies black foreground whilst inheriting the cell background
Explicit differential solid fills treat their effective background as the visible colour, including the native foreground-only solid control; a matching conditional fill clears detached ordinary gradient metadata without modifying the source stop array
Higher colour-scale ownership remains one complete fill slot; matching rules respect the represented priority and stop behaviour, including a Classic stopping rule without a differential style
Classic imported fills bind their CFEX metadata by group identifier and rule index, retain extended RGB, indexed, automatic and theme colours with tint, and preserve opaque extension bytes through saving and deep cloning
Clones receive independent group identifiers and noncolliding extension priorities, including an imported group identifier of zero; identity and priority overflow checks happen before groups are appended, and empty groups produce no dangling extension records
Imported and internally cloned formula trees belong to their rules, whilst existing caller-supplied formula objects keep their borrowed ownership; read leases block the complete metadata clone
Native Classic theme colours can come from the embedded ZIP theme package; source input and the cumulative inspected decoded XML each have a 16 MiB limit checked before allocation and decompression, using the existing verified ZIP streams
Raw differential and extension bytes consume the shared appearance work budget before style cloning and decoding; malformed metadata, resource refusal and priority overflow leave the qualified source state unchanged
The represented native Excel legacy controls apply a rule even when its CFEX active bit is clear; saving keeps the opaque bit and this observed participation, without claiming general standard-conforming inactive-rule execution
Independent PDF checks match all nineteen native coloured 8 by 8 masks in both output formats and their 0.96-point tile period; this does not establish native pagination, glyph rasterisation or full-page pixel identity
Conditional gradients use the profile below; further Classic calculated, aggregate and date contexts, Unicode relation ordering, unmodelled Classic imported appearance and CF12 compatibility remain separate work; custom-table pattern summaries retain their existing boundary
Classic stable conditional expressions
Classic cellIs bounds and expression rules can evaluate represented stable formulas during read-only appearance capture, with local worksheet references, scalar operators and the calculator subset observed in the wild
Supported functions include SUM, AVERAGE, MIN, MAX, COUNT, MOD, AND, OR, IF, ISERROR, ROW and COLUMN; unsupported functions refuse explicitly without a legacy calculator fallback
Relative references take the first physical range of the owning conditional-format container as their anchor across all areas, including non-A1 owners, left/up offsets and mixed absolute references
ROW and COLUMN accept no argument or one local single-cell reference without reading that referenced value; ranges and unsupported argument forms keep an explicit refusal
Targets and referenced formula cells use stored scalar values and valid loaded/calculated caches independently of view formula-evaluation options; capture does not recursively calculate the live workbook, invoke UDF callbacks or lazily materialise shared strings
Compiled formula trees are privately cloned without unrelated retained tokens or array payloads; source formulas, caches, generation, callback configuration and shared-string slots keep their inspected state
Each expression admits at most 4096 AST nodes, depth 32, 65536 formula text characters and 65536 referenced cells; the capture draws on a 16000000-unit work allowance
A conservative charged 4 MiB copy/evaluation allowance covers the pinned target and each formula clone, stack, intermediate and result, with stored cache/string length preflight before copying; stored-value population reads also draw on this allowance
These charged limits describe admission accounting rather than process RSS or exact allocator overhead; unsupported or excessive input yields no partial portable snapshot
Represented dates and typed calendar caches use the workbook's 1900 or 1904 serial domain, whilst numeric formula caches keep their distinguishable serial identity
The BIFF reader maps the native 1900 date-formatted serials 59 and 60 onto the same stored calendar interval [60,61); this ambiguous literal interval, fractional values included, refuses appearance evaluation rather than choosing a false result
The ambiguity refusal does not apply to numeric formula cache serials 59 and 60 or a typed calendar formula cache for 28 February 1900; recovery of the original ambiguous literal serial remains separate work
Names outside the profile below, UDFs, volatile/application functions, external links, missing caches, retained array values and other unrepresented formula structures stay unsupported; this increment does not complete every Classic conditional-format, aggregate or CF12 profile
Stored names in Classic conditional expressions
Represented Classic conditional formulas can expand already compiled workbook names and names scoped to the current worksheet, including constants, nested pure functions and absolute cell or area references on the current sheet
Name resolution reads existing compiled identities without lazy compilation, source parsing, user callbacks or live workbook calculation; conditional references keep their owner anchor whilst references within definitions remain absolute
The existing shared 4 MiB allocation and 16000000-unit work allowances still apply, with expanded repeated definitions counted against 4096 nodes, depth 32, 65536 text characters and 65536 referenced cells before cloning
Cycles, deferred or missing definitions, macro and external names, foreign-sheet scope, relative named references, volatile functions and array payloads refuse rather than publishing a partial snapshot; name edits follow the workbook write lease
Saving plans every name's output identity before serialising forward references, so nested names keep their intended definitions after the workbook and worksheet names are reordered
Rebuilt ordinary imported name formulas keep their original header, name encoding and trailing metadata; unrelated name records retain their complete bytes, whilst unsupported retained headers or unserialisable definitions refuse explicitly
This profile does not resolve the imported early-1900 literal-date ambiguity, every Unicode comparison backend, or all the remaining Classic conditional-format templates
Classic conditional gradient authoring and editing
The existing differential SetFillGradient API now writes new and changed Classic linear/path conditional gradients using genuine native DXFN12 data, including legacy CFEX, direct cell-value CF12 and the native fourth-rule CFEX-to-CF12 bridge forms
The qualified public path creates or opens a Classic Workbook, obtains the editable rule style, sets its gradient, saves XLS bytes and reopens them via the bounded effective-appearance adapter; complete geometry, positions and represented RGB/theme tint survive
Clearing an imported gradient with scalar fill setters writes the new solid differential fill instead of restoring stale raw gradient metadata; editable native fields are hydrated before changes and the live fill becomes authoritative afterwards
Unmodified imported DXFN12 bodies keep their raw bytes, whilst replacing only a gradient preserves native font/border sub-blocks and every nonfill extension property; native bold with a green bottom border and italic with a blue bottom border remain intact across the qualified mixed controls
Legacy CF and CFEX carry corresponding fill slots so newly authored gradients display in native Excel; a legacy group header counts only its adjacent CF rules, whilst the existing 18-byte native CFEX descriptor keeps the later CF12 rule attached to its original group
Direct CONDFMT12 cell-value rules keep their native identity and template, and existing earlier property-array CF12 recognition remains a separate compatibility fallback
Classic output checks the 256-stop binary limit before staging a gradient body; a 257-stop save keeps the previous target and source semantic hash, read leases block editable-model hydration and changes, and identity/priority overflow refuses before narrowing
Imported CF12 rules whose ct byte lies beyond the authored kind set keep their original ct, template type and template parameter bytes verbatim; re-saving re-emits them unchanged whilst semantic hashing and portable capture refuse the unrecognised template explicitly instead of evaluating a downgraded cell-value rule
Duplicate and unique relational criteria now fold Latin-1 Supplement accented letters (grave through y-diaeresis, plus the single-letter bases) onto their ASCII base ahead of the qualified comparison; the population gate accepts any Latin-1 foldable text whilst populations beyond U+00FF use the separate platform comparison path described below
The qualified oracle compares every membership cell against Excel's own applied duplicate colours on an accented population: two relation texts folding onto the same base count as duplicates of each other whilst distinct base pairs (Amelie/Ame'elie, Chloe/Chlo'e'', Zoe/Zoe'e'') stay unique; native CJK ordering is locale-dependent (the zh-CN oracle sorts by pinyin) and the foldable profile itself stays deterministic
A fixed comparator corpus binds both backends to their identified oracles: every ASCII case pair duplicates, accented Latin-1 pairs stay unique, I/i duplicates whilst both Turkish capitals stay unique, the composed and decomposed acute accents duplicate each other whilst plain e stays unique, and cross-script near-pairs stay distinct
Populations holding text beyond U+00FF count relational criteria through the existing platform-aware text comparator: Windows uses case-insensitive user-locale word ordering, matching the qualified native Excel controls, whilst Unix uses its runtime wide-string comparison without a Windows DLL dependency
These paths leave the process locale untouched and do not promise identical CJK ordering across different locales or runtime collation backends; the fixed Windows zh-CN oracle remains distinct from native Unix qualification
The relation bound sheds its trailing wildcard marker before comparison, so >= to count the qualified equality edge; the same eight Greek-population decisions pass on Win64 and actual Linux x64 with an explicit Cairo capture geometry
Native aggregate and relative-date templates decoded from Excel-authored CFEX/CF12 evidence now evaluate under Classic headless capture: Top 10 rules (rank, percent, bottom) scan the owning population with a sorted cutoff, above/below-average rules use population deviation bands with the equal-average boundary, and duplicate/unique rules count exact value identity; every scan charges the shared appearance step budget
Overlapping range entries join the population without coordinate-union deduplication: a native-admitted rule storing $A$1:$C$3, $B$2:$C$4 and $B$2:$C$4 counts the repeated numeric occurrences exactly as Excel does
Relative-date rules compare calendar days resolved via the workbook date system against an injectable reference date (ConfigureRenderConditionalReferenceDate on the Classic read-only view), covering yesterday, today, tomorrow, the last 7 days, this week, last month and this month; the qualified oracle compares every cell's captured fill against Excel's own applied conditional colours on frozen 1900-system and 1904-system fixtures
Saving re-emits relative-date CF12 records with their observed template codes and period parameter so reopening restores the decoded semantics; aggregate parameters ride the byte-preserved CFEX bodies
Top-N population semantics carry Excel-applied witnesses over six fixtures (percent cutoffs at fractional counts, bottom variants, an in-range error cell, a two-area range and cutoff ties): the cutoff is the floor of count × rank ÷ 100, errors leave the population, populations span every area of the range and ties at the cutoff all match — headless capture reproduces Excel's applied fills cell for cell; the template-parameter echo check that rejected Excel's percent variants is retired in favour of the filter tail those witnesses validate
Imported custom number formats now decode through their native DXFN12 payload: the numFmt sub-block behind flags bit 0x02000000 starts directly after the flags word and precedes every other sub-block, and custom entries carry their format-code string inline along with the sub-block's self-inclusive byte size (originally misread as a re-issued internal id); headless capture resolves the decoded code ahead of any table-indexed id so composed cells match Excel's applied number formats, whilst builtin-token entries resolve through the swept 23-entry locale-independent token table — their token rides the high byte of the marker word, currency and international built-ins carry no tokens because Excel always inlines those as custom entries, and unknown tokens stay refused rather than guessed; the differential style exposes the decoded string through TXLSDxfStyle.NumFmtCode with its HasNumFmtCode flag
Authored rules with a differential number format now save through a native CF12 record: because the legacy CFRULE format block cannot carry a number format, a group whose every rule needs CF12 stores as a plain CONDFMT12 + CF12 envelope, the same shape Excel itself writes when no rule can ride a legacy record; the DXFN12 sub-block serialises the format-code string inline (built-in ids resolve through their format-code string), a fill composes through the same pattern word and colour properties as gradients, and the word after the 03 80 marker is the block's self-inclusive byte size, which native Excel requires to be nonzero; a gradient composes in the same differential (all three fill attribute bits cleared, Excel's placeholder pattern word, the gradient property as the only property entry) byte-for-byte identical with Excel's own converted form; files authored this way open in Microsoft Excel with the rule visible and the number format, fill and gradient stops applied, verified against built-in id plus fill, custom format code and gradient compositions
Authored plain appearance now saves through the same CF12 channel: fills ride the pattern word plus colour properties, fonts ride the legacy 118-byte font block with RGB colours through the property tail, and rules carrying only legacy-imported bytes keep their original envelope
The ordinary cell-value font and fill controls qualify this represented authoring path; they establish neither calculated expression contexts nor a replacement for the remaining source/edit/save/reopen/portable/native evidence for every conditional-appearance family
Overlapping priority and stop-if-true composition carries native witnesses on both engines: a fixture with a stopping red fill at priority 1, a green fill at priority 2 and a bold font at priority 3 shows three bands, and both Classic and modern headless capture match Excel's applied fill colours and bold state cell by cell — including the stopped rows where the font rule never evaluates
Saving mutates neither source raw bytes, live style metadata, group identities, priorities nor the complete semantic hash; temporary emission blobs release on errors
Actual native observations validate the qualified new, edited, cleared, false-rule and mixed-font/border files; complete CFB stream equality links final files to those observations, whilst the 256-stop maximum has library save/reopen coverage without a native UI claim
Further Classic calculated/aggregate/date contexts, Unicode relation criteria and additional CF12 templates or DXFN12 number-format/nonfill authoring remain outstanding work; preserving imported border bytes does not establish new portable border rendering
Conditional linear and path gradients
Modern XLSX differential styles support linear and rectangular path gradients through standard DXF XML, stable conditional evaluation, detached portable snapshots and vector Cairo PDF output, including matching expression rules on cells left blank
Use TXLSDxfStyle.SetFillGradient with a TXLSDxfGradientKind of dxfGradientLinear or dxfGradientPath and a TXLSDxfGradientStops array of TXLSDxfGradientStop records; each stop pairs its Position with a ColorKind of type TXLSDxfGradientColorKind — automatic, indexed, RGB or theme identity and Double tint — with RGB values kept in the existing BGR byte order
FillGradientKind, the geometry properties, FillGradientStopCount and FillGradientStops[Index] expose read-only values; CopyFillGradientStops returns a detached array, and ordinary Assign copies the complete gradient independently
The example below applies a red-to-blue linear gradient to an existing differential style Dxf, using a local Stops: TXLSDxfGradientStops variable
SetLength(Stops, 2);
Stops[0].Position := 0;
Stops[0].ColorKind := dxfGradientRgb;
Stops[0].ColorValue := $0000FF;
Stops[1].Position := 1;
Stops[1].ColorKind := dxfGradientRgb;
Stops[1].ColorValue := $FF0000;
Dxf.SetFillGradient(dxfGradientLinear, 45, 0, 0, 0, 0, Stops);
For dxfGradientPath, the four bounds describe the interior rectangle in normalised coordinates; bounds must be ordered within zero through one, stop positions must be nondecreasing within that interval, and geometry, positions and tint must be finite, with tint between minus one and one
The model and modern import accept up to 1024 stops, whilst portable projection requires at least two; remaining capture stop limits are checked before detached copies, and stop visits draw on the existing shared appearance work budget
Standard DXF XML uses invariant parsing and 17 significant digits locally, keeping qualified native Double positions, geometry and tint without changing unrelated number parsing
A matching gradient owns the complete fill slot; higher foreground-only or background-only overrides suppress a lower gradient, keep the native solid fallback where the pattern slot is available, and leave unrelated font and number-format priority independent
A scalar override of an ordinary modern gradient clears only the detached effective gradient; lower fills cannot replace a higher active gradient, and an explicit higher pattern keeps its identity
Imported Classic CFEX gradient records support the qualified cell-value rule path, retain their opaque representation through saving, and project their bounded geometry and colour stops into the same portable gradient engine; the binary source has its own separate 256-stop limit
Indexed stops resolve in the owning workbook, theme and RGB tint use the existing colour resolver, and native automatic gradient stops resolve locally to white without changing global automatic-colour behaviour
Read leases block gradient mutation before copies or model changes; source hashes and generations stay unchanged during positive capture, resource refusal and guarded writes, and inherited snapshot arrays remain detached
The qualified PDFs contain vector linear or path shading without image placements; exact snapshots, colour functions, path direction and native colour/geometry observations do not establish native pagination or full-page pixel identity
The existing modern font-only StopIfTrue interpretation can differ from the qualified Excel reopen behaviour, which exposes the lower gradient; Classic stopping behaviour is retained
Classic new and changed gradient writing uses the qualified profile above; other CF12 gradient forms, further Classic calculated/aggregate/date contexts and Unicode relation ordering remain outstanding work
Ordinary gradient cell fills
Modern XLSX capture and Cairo output retain ordinary linear and rectangular-path gradients on cells with or without text; Classic workbooks author, keep and re-export ordinary gradient cell bases through native BIFF8 XFExt FillGradient extensions
Classic interiors — IXLSInterior as implemented by TXLSInterior — expose SetGradient, ClearGradient and read-only gradient getters; SetGradient validates the same geometry, position and tint bounds as differential gradients and caps stops at the shared 256-stop Classic binary limit before the model is touched
Classic interiors also keep the indexed fill accessors: ColorIndex and PatternColorIndex read and write the fill and pattern colours in the Excel index scheme, where xlColorIndexAutomatic maps to automatic, xlColorIndexNone to none and indices 1 to 56 map onto the BIFF palette whilst anything above 56 leaves the current fill untouched, and PatternColor resolves the effective pattern colour, preferring a recovered rich RGB or theme slot and otherwise resolving the indexed entry
The cells' XFs keep a legacy solid approximation — solid pattern with the nearest palette colour of the first stop — whilst the exact gradient travels in the paired $087D record; reopening an Excel-authored Classic file with XFExt gradients registers the same base, and re-saving emits it again
Internally the workbook XFExt side-table stores each base as a TXLSXfGradientFill carrying TXLSXfGradientStops of TXLSXfGradientStop records (position, colour kind, colour value, tint); XF promotion deep-clones through TXLSXfGradientFill.Clone so independently edited cells never share stop arrays
Ordinary scalar fill setters (colour, pattern colour, pattern or their indexed/theme forms) demote the gradient base to the solid approximation, mirroring native fill ownership; gradient registration and palette planning both ride the established XFExt side-table
Portable headless capture composes the gradient base with conditional scalar partial fills exactly like a native gradient base: a matching scalar conditional fill suppresses the gradient and owns its solid fallback, whilst non-matching cells keep the gradient
The example below applies a two-stop linear gradient to Classic cells A1:A2 through the range interior, using a local Stops: TXLSDxfGradientStops variable
SetLength(Stops, 2);
Stops[0].Position := 0;
Stops[0].ColorKind := dxfGradientRgb;
Stops[0].ColorValue := $CC6633;
Stops[1].Position := 1;
Stops[1].ColorKind := dxfGradientRgb;
Stops[1].ColorValue := $408000;
Sheet.Range['A1', 'A2'].Interior.SetGradient(
dxfGradientLinear, 90, 0, 1, 0, 1, Stops);
| Field | Contract |
|---|---|
GradientKind (TXLSPortableGradientKind) | xpgNone, xpgLinear or xpgPath; active gradient state cannot also specify a non-solid pattern |
GradientDegree | Finite linear direction, reduced from its actual binary64 representation for large angles up to1.7E308 |
GradientLeft, GradientTop, GradientRight, GradientBottom | Absolute normalised convergence bounds within0..1, left no greater than right and top no greater than bottom, including a collapsed inner rectangle |
GradientStops (TXLSPortableGradientStops) | Two through1024 TXLSPortableGradientStop values, each with nondecreasing0..1 Position and resolved24-bit ColorRGB; equal positions preserve a discontinuity |
Snapshot construction and returned cell records deep-copy stop arrays; HasFill=False retains dormant source metadata while Mono and Draft omit shader appearance
The optional IXLSRenderCaptureFillBudgetSource supplies ReadRenderStyleWithFillBudget with a0..1024 maximum stop count and captures style, rich-text and last-line metadata together; the existing interface GUIDs are unchanged
The modern adapter checks the effective owned fill stop count before semantic style cloning; portable capture derives the available count from its remaining bytes and allows for two portable stop copies and a temporary semantic copy
Linear colour fields use normalised cell coordinates; ordinary intervals use a linear shader and duplicate positions use bounded mesh strips, whilst path gradients use at most four patches per nonzero interval around the convergence rectangle
Absent endpoint stops imply black at0 or1 in the prepared output, matching the native non-endpoint witness without changing the original detached stop array; colours interpolate as opaque RGB
Physical cell clipping, worksheet-point geometry, page scaling and the fill/border/text phases remain in force; no cell-area-sized pixel array or global printer configuration is used
Ordinary linear shaders reserve4096 plus64 times the stop count plus two endpoint slots; discontinuity meshes take4096 plus1024 times the stop count plus one interval slot; path meshes take4096 plus4096 times the stop count plus one interval slot
Capture, snapshot loading, print planning and native layout account for detached stop arrays; shader work and both large-angle reduction passes are checked before preparation, with at most971 modular-doubling iterations per pass
Snapshot10 uses HXRSNP10 and keeps all version9 fields, then writes a32-bit kind, five binary64 geometry values, a32-bit stop count and12 bytes per stop; malformed arrays reject before publication and failed reads restore the input position
Solid, last-line and pattern-only records keep their prior minimum versions; scene text rejects worksheet-gradient state and consumers must rebuild for the expanded managed record layout
The represented native controls cover six linear and two path fields, compared at361 normalised samples per cell; different font/print grids and native anti-aliasing seams do not establish geometry, pixel or PDF-byte equality
Cairo mesh support is required for path and discontinuous gradients; conditional gradients use the separate profile above, whilst further dynamic conditional appearance remains active
Bounded modern conditional appearance
Modern workbook capture resolves two- and three-stop colour scales into ordinary detached RGB fills, supporting minimum/maximum, finite numeric, percent, percentile and stable formula thresholds; exact endpoints, clamping and constant populations are retained
Populations read stored values and valid loaded/calculated formula caches, converting typed dates to the source workbook serial system ahead of numeric evaluation; invalidated caches reject instead of calculating the live workbook
Threshold and relative-expression formulas use the existing bounded detached compiler with stored-value callbacks; names, caller functions, application nodes, volatile functions and external links stay unsupported in this stable capture profile
Colour-scale fill shares the fill-priority slot with differential fills; the original DXF application path keeps supported font names, point sizes, emphasis and other represented slots, so a font-only rule can combine with a lower-priority scale fill
Priority and StopIfTrue remain effective; source formulas, caches, stored values, source XML and workbook generation are kept intact without a save/reopen clone
Opaque RGB, valid theme/tint and indexed scale colours are supported; non-theme nonzero tint, unknown threshold tokens, malformed stop/colour counts, unsupported metadata and descending or nonfinite interpolation ranges reject explicitly
The optional IXLSRenderConditionalCaptureSource on the modern read-only view exposes PrepareRenderConditionalAppearance(Row1, Col1, Row2, Col2, MaxBytes, MaxSteps, ReservedBytes) and ReleaseRenderConditionalAppearance; existing capture interface GUIDs are unchanged
Prepare reports the complete reserved byte slice through its output ReservedBytes; retain that reservation while the context is live and release it from a finally block, including after a failed capture
The normal capture bridge prepares one context before scene/cell arrays, reserving at most half the remaining capture bytes and at most64 MiB; source scans, formula compilation and evaluation are additionally bounded to16 million work units, alongside the existing bound for the appearance loop
A rectangle without advanced rules reserves no context; adjacent alignment probing cannot lazily allocate an unreserved one, and changing the active view sheet or releasing the view discards retained context state
Direct style calls without explicit preparation use a64 MiB and16-million-work context limit; normal workbook capture retains the tighter caller reservation and existing snapshot budgets
Interpolation keeps the existing double-fraction and per-channel truncation policy; in the54-cell independent native control,53 colours match exactly and one cell differs by1 in each of two channels, with all54 text values and both bold overrides matching
The shared detached engine also routes represented aggregate rule families, but this increment's independent native qualification covers scale populations and relative-expression overrides; it does not close every aggregate family or Classic advanced appearance; date-period display follows its separate profile below; data bars and icon sets have separate qualification below
Duplicate and unique text criteria
Bounded modern duplicate/unique appearance uses the typed rule metadata and the complete target population; stored text containing star or question mark enters the supported criteria grammar, whilst ordinary relation-looking text without either character keeps exact-frequency semantics
Default and explicit equals support case-insensitive star/question-mark matching, tilde escapes and a final unmatched tilde in active wildcard grammar; plain tilde text without a star or question mark stays literal
Wildcard matching distinguishes numeric text from numbers; active not-equal wildcard criteria also count non-matching nontext values and true blanks, and a criterion matching zero values is neither duplicate nor unique
A constant empty string explicitly stored in the shared-string table takes part like a valid empty formula cache, including the complete analytical blank population; absent or merely styled blank target cells remain unmatched
Within active criteria grammar, less-than, greater-than, less-or-equal and greater-or-equal compare the suffix literally, star, question mark and tilde included, instead of expanding it as a wildcard
The qualified ASCII relation profile uses local case-insensitive word ordering with fixed punctuation weights and no runtime locale dependency in the comparator; the complete range's original text comparison prefixes have to be ASCII before case folding
The comparator terminates at the first embedded NUL whilst keeping the complete source string; it uses at most three linear scans, no dynamic comparison allocation and the existing shared work callback for every scanned unit
Criteria activation examines the complete stored text, so star or question mark after an embedded NUL still activates the relation grammar; actual escaped OOXML text confirms that behaviour, whilst direct COM text assignment can truncate the value before it reaches the rule
Source text population, capacity growth and temporary pattern bytes are reserved before use, wildcard backtracking consumes shared work, and matching stops after two hits because appearance distinguishes only zero, one and multiple matches
The ordinary exact-key path, rule priority, StopIfTrue, source scalar types, formula caches, leases and generation stay intact; memory/work refusal permits reuse under restored limits and introduces no new snapshot version
Multibyte ANSI string values keep their source variant identity, and conversion scans the actual UTF16 length whilst original source-byte reservations remain conservative
The current Windows composition passes 912 native-membership/resource controls and 53049 ASCII ordering pairs; six complete detached snapshots match their frozen Windows/Linux outputs, including explicit empty-text appearance
Independent frozen PDF controls verify 32 and 21 duplicate/unique vector fill regions plus 15 typed-relation regions, corresponding text and source geometry with no raster images; these are membership and detached-geometry checks, not native printer or glyph-pixel parity
Non-ASCII and mixed-population relations keep their prior path without a new rejection; Unicode/locale ordering, further aggregate qualification, Classic advanced contexts and further gradient source/writer forms remain active B5 work
Standard-deviation conditional boundaries
Modern above/below standard-deviation rules include numeric values sitting exactly on the requested threshold, independently of the EqualAverage flag, matching the native one-, two- and three-standard-deviation controls in both directions
Ordinary above/below-average rules with zero standard deviations keep strict comparison unless EqualAverage is enabled; represented Top/Bottom percentage ranking keeps its existing floor behaviour
The shared direct evaluator and bounded portable context use the same population, stored-value, formula-cache, priority, StopIfTrue and resource paths without live recalculation or extra snapshot fields
The native six-endpoint control survives snapshot persistence and vector PDF output with six matching fill regions and34 numeric labels; broader aggregate-family qualification and Classic advanced appearance remain separate
Editable Classic Top and Bottom rules
Classic Top/Bottom rules retain complete Word ranks through CFEX import, public editing, serialisation, reopening and cross-workbook worksheet copying; the qualified native controls include ranks 300 and 1000 rather than truncating them to one byte
The qualified legacy path follows Excel's editable Boolean CF plus template-5 CFEX representation, preserving rank, bottom and percent metadata; it rebuilds a temporary relative population formula from the current owning ranges and settings without replacing the rule's original formula state, whilst native standalone filters follow the separate profile below
The qualified path retains ordinary cell-value companion formatting alongside TopN, including independent bold and fill ownership, and writes represented gradient conditions with the existing differential-format machinery
Native controls reopen saved, edited, copied and authored output as editable TopN rules, check actual matching and non-matching displayed styles, then change native data and Rank and verify the recalculated appearance
Count ranks must be within one through 1000 and percentage ranks within one through 100 for this writer; the current capture uses its existing bounded population scan and sorted cutoff, represented ties included
The CF12 reader distinguishes filter type 5 from icon-set type 6, keeps the old type-5/template-4 icon compatibility path, checks the complete filter rank and verifies template/tail consistency; template headers and parameter spans are checked before the first read
Native standalone CF12 filter writing now follows the qualified profile below; the legacy CF/CFEX gradient path remains available and the earlier rejected standalone gradient experiments are no longer emitted
The six native population controls cover represented multi-area, error-containing, fractional-percent and tied-cutoff cases; broader aggregate contexts and full cross-backend lifecycle qualification remain active B5 work
Native Excel rejects assigning Rank=0 through its Top10 API in all four Top/Bottom and percent/count combinations, whilst Rank=1 succeeds; this authoring boundary does not establish the interpretation or repair behaviour of every manually constructed OOXML or BIFF rank-zero input
Native standalone Classic TopN filters
Imported native standalone Top/Bottom filters keep their original envelope and save without being forced through the legacy bridge; represented edits and newly authored number-format filters use that same native form
The qualified profile covers solid background fills, bold font state, custom or built-in number formats, complete Word count ranks from 1 through 1000 and percentage ranks from 1 through 100
Untouched native differential bodies stay byte-identical through ordinary saving, rejected style writes and worksheet copying; represented style edits rebuild the differential from the current state
Explicitly assigning a fresh empty differential style clears its appearance through immediate portable capture, copying, saving and reopening whilst keeping the TopN rule and rank; old imported formatting no longer reappears through a stale fallback
An edited style that contains only an unsupported-appearance marker refuses reconstruction; an explicit assignment from a known empty style allows deliberate recovery
The established authored gradient profile retains its independently qualified legacy bridge, including Word ranks 300 and 1000; standalone gradient composition, gradient-plus-number-format filters and arbitrary font-name/scheme/size changes stay outside this increment
Native population witnesses cover disjoint multi-area ranges with errors, text and Boolean values, Excel-normalised unions, percentage floor/minimum-one selection, ties and zero values; non-normalised imported overlapping populations and unrelated conditional templates remain separate work
Actual displayed text supplies the native number-format oracle when Excel's conditional-format getter exposes a null or stale value; preserved raw formatting on its own is not counted as portable appearance support
Rank-zero authoring/saving remains refused; direct Rank/Percent/Bottom edits now follow the owner-guard profile below, whilst broader Classic conditional profiles remain separate requirements
Classic TopN metadata ownership
Changes to Rank, Percent and Bottom acquire the owning workbook write guard before changing the value and advance its generation after success; a live read lease rejects the edit whilst preserving the old value and generation
Assigning the existing value stays a no-op, and copied worksheet rules acquire their independent destination owner rather than the source owner
These metadata setters do not dirty differential appearance, so native formatting bytes stay unchanged; existing field types and deferred save-time range validation keep their previous behaviour
Bounded modern relative-date appearance
Modern portable capture supports all ten represented relative-date periods through one detached conditional context, keeping source workbook date-system conversion, differential styles, priority and StopIfTrue
Yesterday, today and tomorrow use calendar days; Last7Days includes the reference day and six preceding days; weekly bands begin on Sunday, whilst previous/current/next months compare calendar year and month
Numeric stored values and valid numeric formula caches use the workbook serial epoch, typed dates keep calendar identity, and supported text values accept invariant numeric serials or exact yyyy-mm-dd calendar dates
Boolean, blank, empty-formula, ordinary non-date text and typed errors stay unmatched; source scalar types, values, displayed text and workbook generation remain unchanged
Period metadata determines execution; stored time-period formulas are derived and are not compiled as independent expressions, so this enables no general volatile formula execution
The optional IXLSRenderConditionalReferenceDateSource.ConfigureRenderConditionalReferenceDate configures an existing read-only view without changing earlier interface GUIDs; zero selects automatic local Date sampling and a nonzero valid OLE date picks an explicit reference
Each capture samples an automatic reference once for every cell and rule in that context, and a later capture samples again; explicit references bypass the clock, prepared contexts reject reconfiguration, and persisted snapshots stay detached from subsequent clock changes
Use the configured view with the existing CaptureXLSPortableViewRenderSnapshot entry point; ordinary owner capture carries on using its own automatic reference
Text parsing is bounded to64 characters and borrows the source length before reserving temporary conversion bytes; digit-bearing text outside invariant numeric or strict ISO form rejects stable capture because recipient-local interpretation is not qualified for use
Convert other localised text dates to an explicit serial, typed date or canonical ISO date before capture; broader localised text profiles, additional aggregate families and Classic advanced appearance remain separate work
The native two-epoch control has118 matching cells among910 values; independent PDF inspection verifies all118 vector fill regions and910 calendar labels with zero raster images, without claiming equal native pagination or pixel identity
Date appearance uses the existing snapshot format chosen by its represented ordinary fields and needs no new wire version
Classic relative-date conditional formatting
Classic BIFF8 conditional rules support all ten TXLSCfTimePeriod values for authoring, save/reopen and bounded portable capture, including previous and next weeks and months; weeks start on Sunday and month comparisons keep their calendar year
When an authored time-period rule has no Formula1, the writer compiles a temporary relative Boolean formula for the stored CF12 rule and frees it after serialisation; the public rule keeps its original formula state, and month boundaries use calendar dates across year and leap-year changes
Imported CFEX parameters are read after the actual optional differential-format payload rather than at one fixed byte position, keeping the existing raw extension; malformed flags, sizes and truncated parameters reject before out-of-range access
Capture evaluates against the per-view reference date and distinguishes already normalised typed or date-formatted values from raw numeric serials before applying the 1900 or 1904 epoch; a stored pure error formula stays non-matching even when native template metadata identifies a time period
The qualified output includes all ten actual native gradient matches and non-matching controls in both date systems, plus Excel-resaved imports; a native month rule whose stored formula is already an error is kept as an error control rather than evidence of a successful month match
Other Classic calculated contexts, remaining CF12 differential-format compatibility and locale-sensitive relation ordering stay separate work
Bounded modern data bars
Modern capture detaches standard and supported linked Excel 2010+ data bars from stored values and valid formula caches, with numeric, range, percent, percentile and stable formula thresholds, signed domains, automatic or midpoint axes, bars without axes and custom minimum/maximum lengths
Solid and gradient bars keep supported positive/negative RGB fills, border colours, axis colours and left-to-right or right-to-left direction; context direction resolves against the source worksheet, and hidden values clear detached display text without changing source values or formula caches
Standard bars without a rich extension keep one positive colour for both signs and have no axis; the standard model starts with AxisPosition=2, while explicitly setting AxisPosition=0 selects automatic-axis rich output
Data bars use a separate conditional visual slot, keeping cell backgrounds and supported higher-priority font changes; the first matching bar follows rule priority and StopIfTrue
The optional IXLSRenderConditionalVisualSource extends modern read-only capture without changing earlier interface GUIDs; an older style-only bridge rejects active data bars rather than returning a snapshot with missing visuals
The interface declares a single method: ReadRenderConditionalVisual takes a row, a column and a gradient-stop budget and hands back the cell style, rich-text status and last-line justification together with a detached TXLSPortableDataBar when a data bar is active for that cell
Cairo paints clipped bars above the cell background and below text, with a two-point inset and represented three-quarter-point borders and axes; gradient preparation and drawing operations draw on the existing layout memory and work budgets
Snapshot wire version 11 carries the fixed data-bar record; readers keep earlier versions, and snapshots without bars continue to select the lowest applicable previous wire version
Imported rich rules require an unambiguous standard GUID and canonical range binding with retained namespace provenance; duplicate or missing bindings, unknown bar children, changed raw provenance and unsupported identities reject rather than publishing a partial snapshot
Parsing reserves copied namespace strings and attribute-pair comparison work before allocating the XML tree; byte and work limits stay caller-controlled, and well-formed foreign metadata is kept within those limits
Independent native PDF controls cover 42 solid width/colour cases and 28 custom-length cases with a 0.006 normalised-width tolerance; these geometry and colour checks do not claim pixel-identical gradient rasterisation
For typed rich-bar editing, output restrictions and Strict behaviour, see rich data-bar persistence; Classic data bars and further aggregate-family qualification remain separate work; Classic date rules follow the profile above; modern icon-set display follows the bounded profile set out below
Bounded modern conditional icons
Modern portable capture supports all twenty represented icon families through the shared detached threshold evaluator, covering standard rules and namespace-verified standalone x14 rules in worksheet priority and StopIfTrue order
Finite numeric cells and valid numeric formula caches use number, range minimum/maximum, percent, percentile and stable formula thresholds; operative boundaries keep inclusive or exclusive equality, and Reverse and ShowValue remain independent
Imported positional custom icons keep their family/index identity, including native NoIcons criteria; a hidden icon still records its selected rule and value visibility whilst producing no icon ink
The optional IXLSRenderConditionalIconSource.ReadRenderConditionalIcon exposes style, rich-text status, last-line alignment, data bar and icon together without changing earlier interface GUIDs; older visual bridges reject any icon they cannot represent
TXLSPortableCell.Icon contains the fixed TXLSPortableIcon fields Present, ShowValue, NoIcon, SetType and IconIndex; binary consumers must be rebuilt after this record layout change
Only snapshots containing actual icon payloads require HXRSNP12 and wire version 12; older readers' supported snapshots keep zero-initialised icon fields, and snapshots without icons retain their previous minimal wire version and bytes
Only snapshots containing a cell with a number format fill character need HXRSNP13 and wire version 13, which keeps all version 12 fields and then writes, per cell, the fill character code unit and its text position as two 32-bit values, both zero for a cell without fill
Only snapshots containing a cell whose centre-across run extends to the left need HXRSNP14 and wire version 14, which keeps all version 13 fields and then writes, per cell, the direction flag as a 32-bit value
Only snapshots containing overflowing text need HXRSNP15 and wire version 15, which keeps all version 14 fields and then writes, per cell, the overflow flag as a 32-bit value
Snapshots containing a stroked polygon with round joins need HXRSNP16 and wire version 16. Bit 2 of the existing scene fill and stroke flags records RoundStrokeJoin. Older snapshots load with the flag clear, and snapshots without round joins keep their previous wire format. Rebuild the binary consumers of TXLSPortableSceneObject once the library has been updated
Cairo draws shared family silhouettes as clipped vector paths, using a fixed 12-point icon and a 14-point leading text gutter mirrored for right-to-left cell text; no native and portable pixel identity or print-page geometry equivalence is claimed
Icon-only and data-bar-only cells stay present even without display text or an ordinary background; existing monochrome/draft print policy suppresses icon ink with other conditional decorations
Each visible icon reserves 512 drawing work units before layout, whilst existing range, formula, stable-function, metadata memory and per-page work limits remain active; malformed family/index/flag/version fields reject transactionally
Capture preserves original values, raw extension strings, the represented rule inventory and generation; standalone x14 rules are synthetic detached context objects rather than additions to the live collection
Pure imported icon extension workbooks open and keep their complete extended rules through ordinary saving imported icon persistence boundaries separate this preservation path from typed custom-icon authoring and mixed data-bar output
Ordinary cell alignment
Horizontal xphFill repeats complete display patterns within the text frame, ignoring WrapText and ShrinkToFit; an overwide pattern is drawn once and physically clipped, and no partial pattern is appended to fill the leftover space
Hard breaks become spaces in the Fill display plan whilst the original workbook and snapshot text stay unchanged; generated characters, glyphs, runs and temporary layout storage are checked against the existing budgets before allocation
Horizontal xphJustify and xphDistributed wrap implicitly even when WrapText is false; they add spacing at eligible word or ideographic-cluster boundaries whilst preserving shaped clusters, rich-run styles and visual bidi order
Justify leaves the final line of each paragraph unstretched; Distributed stretches eligible lines including the final line, centres a single word without spacing opportunities and reserves Normal-font indentation on both sides
Vertical xpvJustify and xpvDistributed add equal interline gaps when the content is shorter than the available physical height; a single Justify line stays at the top, whilst a single Distributed line centres vertically
| Symbol | Contract |
|---|---|
TXLSPortableCell.AlignmentSpanColumns | Total text-frame column count; zero takes the physical cell frame; a positive count is legal only for Fill or CenterContinuous, includes the physical ColumnSpan and fits the snapshot column bounds |
xphCenterContinuous | Centres text across the explicit text frame, including the captured following blank cells with the same alignment |
IXLSPortableCellRangeSource.ReadPortableColumnLimit | Optional read-only source interface handing back the actual workbook column limit; Classic returns256 and XLSX returns16384 |
Workbook capture extends Fill and CenterContinuous text frames through genuinely blank following cells with the same alignment, stopping at nonempty cells, formulas, different alignments, merged boundaries or drawing scenes; a formula handing back an empty string is not a blank cell
Capture checks the next source column beyond its right edge and rejects an incomplete alignment run; include the whole intended run in the requested rectangle, and supply the optional range-source interface when implementing an external capture source
The text span changes only layout and clipping; physical cell spans, fills and borders stay separate, and scene text cannot use a grid-column span
Extended alignments combined with rotation or stacked text currently reject; ordinary rotated and stacked layouts stay supported through the earlier alignment modes
TXLSXAlignment.JustifyLastLine keeps its default false value and true/false XML forms through assignment, pool deduplication and save; Classic capture also reads the inherited BIFF flag
Last-line alignment and automatic indentation
TXLSPortableCell.JustifyLastLine keeps the source flag separately from horizontal alignment; the upgraded workbook capture carries the actual flag into an immutable snapshot
For Distributed text with this flag enabled, the available extra width is shared out equally before the first unit, between eligible word or ideographic-cluster units, and after the last unit; with G internal opportunities, each share is the free width divided by G+2
The occupied line stays centred between its two outside shares; a single word without an internal spacing opportunity remains centred, and explicit Distributed indentation reserves both physical insets before the extra spacing is calculated
This behaviour applies to each actual Distributed line, including paragraph-final lines; shaped clusters, rich-run styles, bidi ordering and the original source characters remain intact
Justify keeps the compatibility flag without changing its final-line placement, matching the native true/false controls; the flag name does not imply that every horizontal mode stretches its final line
The optional IXLSRenderCaptureAlignmentSource.ReadRenderStyleWithAlignment method hands back the existing style, rich-text presence and exact last-line flag in one read-only appearance pass; its separate interface identity leaves all existing interface GUIDs and method layouts unchanged
The older IXLSRenderCaptureSource.ReadRenderStyle method still rejects true justified/distributed flags because its return type cannot carry them; external capture sources can implement the optional extended interface to provide the flag
Rich text and ordered drawing scenes
TXLSPortableCell.RichText is a TXLSPortableTextRuns array of TXLSPortableTextRun records holding Text, FontFamily, FontSizePoints, FontStyles, ColorRGB and BaselineShiftPoints; the concatenated run text must match the cell display text exactly
XLSX runs inherit omitted properties from the effective captured cell font, including supported table and conditional formatting; explicitly assigned false flags and explicit none/baseline/automatic colour values override inheritance
XLSX runs inherit omitted properties from the effective captured cell font, supported table and conditional formatting included; explicitly assigned false flags and explicit none/baseline/automatic colour values override the inheritance
Native shared strings and inline strings preserve run boundaries and whitespace; unsupported native font children, attributes, namespaces, theme/indexed rich colours and phonetic annotations are refused rather than silently losing visible appearance
Classic runs resolve their stored BIFF font indices into full effective run fonts; phonetic metadata and unsupported run fonts are refused, and capture keeps the workbook generation and style pools
Classic text shapes read the existing OfficeArt properties and TXO font runs without creating drawing wrappers or changing the workbook; anchors use real row/column dimensions and offsets, supported solid fills and outlines keep their colours and widths, and embedded PNG/JPEG bytes are detached before transfer
Rectangle text uses the native 7.2pt horizontal and 3.6pt vertical margins; ellipse text additionally works with its inscribed text rectangle, keeping ordinary text inside the shape outline in both workbook facades
Imported Classic rectangle and ellipse containers keep their typed text and formatting; skipped native shape or group metadata with no resolved footprint sinks the capture explicitly, whilst unknown object-tail records, drawing extensions, rotation, non-solid fills and unsupported line styles sink an intersecting object
Imported XLSX two-cell rectangle and ellipse anchors support explicit RGB solid fills with alpha, solid or dashed/dotted outlines, physical anchor offsets and a single ordinary rich-text paragraph; each run keeps its effective typeface, point size, colour, bold, italic, single underline and strikeout, explicit bold or italic resets included
The imported shape reader sets aside raw XML scratch storage before parsing and checks the item, byte and text budgets cooperatively; it keeps workbook drawing order and read leases without creating shape models or absent cells
Unknown native shape properties, effects, themes, rotations, grouped transforms, multiple paragraphs and unsupported anchor kinds are refused explicitly; a resolved unsupported footprint outside the capture rectangle does not block the requested region
Run-level superscript and subscript use two-thirds of the run font size and a baseline shift of one-third of its original point size; a style boundary splitting a Unicode shaping cluster, or a CRLF sequence crossing incompatible run boundaries, is refused during native layout
TXLSPortableSceneObject carries a Kind, point-based X, Y, Width, Height, a clipping rectangle, fill/outline colours and opacity, an optional TXLSPortablePoints path, a text cell, or encoded raster bytes and dimensions; TXLSPortablePoints is an array of TXLSPortablePoint records holding point-based X and Y coordinates
TXLSPortableSceneKind contains xpskRectangle, xpskEllipse, xpskPolyline, xpskPolygon, xpskText, xpskPNG and xpskJPEG; array order doubles as drawing order, later objects covering earlier ones
The additional CreateXLSPortableRenderSnapshot overload takes a TXLSPortableSceneObjects array; query IXLSPortableRenderSceneSnapshot for zero-based Objects and ObjectCount, whose getters hand back detached copies including run, point and raster arrays
Cell images and checkbox paths come before floating drawings; floating drawings keep workbook order, physical anchors and viewport clipping, and text shapes use the minor theme font at 11 points with 7.2-point horizontal and 3.6-point vertical text margins
PNG and JPEG images are decoded natively after header, pixel-size and byte preflight; supported floating images keep transparency and stretch geometry, whilst cell images fit inside the cell or complete merged rectangle with their aspect ratio preserved
Crop, rotation, shadows, luminance/gamma adjustment, tiling, SVG companions and live camera bindings stay unsupported; preserved image XML is validated against the supported appearance, so hidden images, unknown nested metadata, foreign namespaced properties, nonrectangular image geometry and unmodelled transforms are refused only where their footprint overlaps capture
Boolean cell checkboxes use a theme-neutral vector box and optional check mark, effective controls inherited from row and column formats included; the requested cell walk is bounded before traversal, other control kinds and blank or non-Boolean checkbox values are refused, and supported cell scenes suppress scalar Boolean or image-error fallback text
A checkbox default counts as insertion metadata and manufactures no Boolean for an absent cell; explicit direct-cell control clearing masks an inherited control, whilst capture reads preserve sparse absence and the workbook generation
XLSReadPortableImageDimensions validates a bounded PNG IHDR or a supported eight-bit sequential/progressive JPEG frame and hands back its declared width and height; decoding stays the renderer's responsibility
IXLSPortableSceneCaptureSource.ReadPortableSceneObjects works in one-based workbook coordinates and point-based scene coordinates relative to the range, validates the range and cooperative limits, and returns consumed byte, text and item counts; HasPortableCellScene picks out cells whose scalar display is replaced by their captured scene
Native layout CellCount counts grid cells and LineCount also takes in text scene objects; a text object's line CellIndex comes out as CellCount plus its zero-based sequence among text scene objects, whilst GetCellGeometry stays restricted to grid cells
The writer picks the lowest compatible snapshot version: HXRSNP01 for scalar cells, HXRSNP02 for runs/scenes, HXRSNP03 for extended font effects, HXRSNP04 for raster crop fields, HXRSNP05 for typed errors, HXRSNP06 for the additional cell layout, accounting underline or border-pattern fields, HXRSNP07 for extended alignment values or a nonzero text span, HXRSNP08 for a true last-line flag, HXRSNP09 for nondefault pattern or background-colour state, and HXRSNP10 for gradients; the loader takes versions 1..10 with the same immutable ownership and input-position rollback contract
Version7 appends a signed32-bit AlignmentSpanColumns after each version6 cell record, including a zero span for scene text; older data keeps its earlier minimum version, and consumers must rebuild for the expanded public record layout
Version8 appends a Boolean32 last-line field after each version7 cell or scene-text record; only 0 and 1 are accepted, false flags keep the earlier minimum version and consumers must rebuild for the expanded public record layout
The combined item budget covers stored cells, rich runs, scene objects and path points; byte limits take account of staged and detached arrays, text, encoded raster payloads and bounded native metadata inspection before allocation
Portable snapshot API
| Symbol | Contract |
|---|---|
EXLSPortableRender | Exception raised for invalid snapshot data, unsupported capture appearance, an unavailable native backend, resource limits or rendering failures |
TXLSPortableFontStyle, TXLSPortableFontStyles | xpfsBold, xpfsItalic, xpfsUnderline, xpfsStrikeout, xpfsDoubleUnderline, xpfsAccountingUnderline and xpfsDoubleAccountingUnderline, combined as a set |
TXLSPortableHorizontal, TXLSPortableVertical | xphLeft, xphCenter, xphRight, xphFill, xphJustify, xphCenterContinuous, xphDistributed and xpvTop, xpvCenter, xpvBottom, xpvJustify, xpvDistributed; existing ordinals are unchanged |
TXLSPortableBorderStyle, TXLSPortableBorder | xpbsNone, xpbsSolid, xpbsDashed, xpbsDotted, xpbsDouble, xpbsDashDot, xpbsDashDotDot and xpbsSlantDashDot; each border carries Style, WidthPoints and ColorRGB |
TXLSPortableCell | Zero-based Row/Column, positive RowSpan/ColumnSpan, display Text, FontFamily, FontSizePoints, FontStyles, TextColorRGB, FillColorRGB, FillPattern, FillBackgroundColorRGB, HasFill, WrapText, ShrinkToFit, RightToLeft, Horizontal, Vertical and four LeftBorder/TopBorder/RightBorder/BottomBorder records |
TXLSPortableCells, TXLSPortableSizes | Dynamic arrays of the stored cells and physical row/column sizes in points |
TXLSPortableRenderLimits | MaxGridCells, MaxStoredCells, MaxBytes and MaxTextCharacters bound construction, capture and serialisation |
XLSDefaultPortableRenderLimits | Hands back 2000000 grid cells, 2000000 stored cells, 67108864 bytes and 16777216 UTF-16 text characters |
XLSDefaultPortableCell | Initialises a one-cell span with Calibri at 11 points and default zero-valued appearance; set its position and desired appearance before construction |
CreateXLSPortableRenderSnapshot | Validates and copies generation, row heights, column widths and stored cells into a detached immutable interface; cells must be unique, in row-major order, within bounds and carry nonoverlapping spans |
IXLSPortableRenderSnapshot | Read-only Generation, RowCount, ColumnCount, CellCount, zero-based RowHeightPoints and ColumnWidthPoints, and copied Cells records |
| Snapshot getter methods | GetGeneration, GetRowCount, GetColumnCount, GetCellCount, GetRowHeight, GetColumnWidth and GetCell expose the same values; invalid indexed access raises an exception |
SaveXLSPortableRenderSnapshot | Validates and serialises one snapshot to a bounded private buffer, then copies the complete versioned snapshot payload into the supplied stream at its current position |
LoadXLSPortableRenderSnapshot | Reads the versioned little-endian snapshot with strict UTF-8 text, validates counts, geometry, styles and spans and refuses trailing data; failure restores the input stream position |
Every limit must be positive; the validated maximum is 2000000 grid/stored cells, 1073741824 bytes and 268435456 text characters, with dimensions no bigger than 1048576 rows by 16384 columns
MaxGridCells counts the entire rectangle, unstored blank cells included; CellCount counts stored visible cells and merged anchors, and may come out smaller
Generation records the source generation or an application-supplied value; it is metadata, not a live link to a workbook nor an automatic freshness check
Native rendering and explicit fonts
XLSPortableCairoBackendAvailable reports whether the compiled native backend is available; native output needs Free Pascal on Linux or macOS, with the Cairo, FreeType, HarfBuzz and FriBidi libraries available to the process
macOS builds link the four native libraries explicitly; a private dependency prefix and an explicit child-process loader path can supply them without touching shared compiler settings or shell profiles
Windows Delphi XE5, Win32 and Win64 can compile the portable interfaces and use snapshot serialisation, but native Cairo layout preparation reports backend unavailability there
Pass an explicit font chain to PrepareXLSPortableCairoLayout; the renderer first tries the matching family and bold/italic style, then same-style fallbacks in the supplied order, demanding glyph coverage for each supported text cluster
Supply the actual regular, bold, italic and bold-italic files your captured content calls for; there is no system-font discovery or synthetic bold/italic substitution, and missing files, style mappings or glyph coverage are refused
Font bytes are captured before shaping, so altering a file affects later layouts whilst an existing layout keeps its captured bytes; FaceIndex selects the nonnegative face in a font file or collection
Native operations are serialised for FreeType face safety; immutable snapshots and prepared layout inspection need no live workbook
Fonts[0].FamilyName := 'Calibri'; Fonts[0].FileName := '/srv/fonts/Regular.ttf'; Fonts[0].FaceIndex := 0; Fonts[0].Bold := False; Fonts[0].Italic := False;
Here Calibri is an explicit family alias for the chosen file, permitting an application-controlled font mapping; inspect the output metrics when mapping to a different font
The renderer handles hard line breaks, four-space tab expansion, paragraph bidirectional ordering, shaped ligatures and combining marks, greedy wrapping and shrink-to-fit; wrap wins over shrink
Wrapping preserves the implemented combining-mark, variation-selector, ZWJ and virama cluster boundaries and favours spaces and ideographic spaces; it is not a complete UAX #29 grapheme implementation nor a Unicode line-breaking algorithm, and regional-indicator and Hangul-Jamo wrapping boundaries come with no guarantee
Font sizes resolve to 1/64 point and text clips to the cell bounds; PDF embeds the explicit fonts with logical text mappings, SVG uses vector glyph paths, and PNG draws those same positioned glyphs at the requested DPI
For measured header/footer text, supply an explicit recipient font metric context during planning; the resulting detached advances and line metrics steer mixed text/image placement without keeping a live measurement provider around
Prepare and inspect a layout
| Symbol | Contract |
|---|---|
TXLSPortableFontFile, TXLSPortableFontFiles | One explicit mapping holds FamilyName, FileName, FaceIndex, Bold and Italic; the dynamic array is ordered and carries between 1 and 64 mappings |
TXLSPortableCairoFormat, TXLSPortableOutputFiles | xpcfPDF, xpcfSVG or xpcfPNG, plus an array of output filenames handed back by file save |
TXLSPortableCairoOptions | Page width/height, four margins, cell padding and raster DPI, together with page, glyph, line, layout, output, font, shaping and drawing limits |
XLSDefaultPortableCairoOptions | Initialises every option with bounded defaults; use it before overriding individual fields |
PrepareXLSPortableCairoLayout | Validates and copies a snapshot, captures the explicit font bytes and returns an owned prepared TXLSPortableCairoLayout; release it with Free |
TXLSPortableCairoLayout | Exposes PageCount, LineCount, CellCount, GetTextLine, GetCellGeometry, SaveToStream, Save and Destroy |
TXLSPortableTextLineInfo | A copied line record carries CellIndex, GlyphCount, XPoints, BaselinePoints, WidthPoints, FontSizePoints, RotationDegrees and logical Text; positions locate the transformed baseline anchor, width is the advance along that baseline, and stacked upright glyphs report zero rotation |
TXLSPortableCellGeometry | A copied rectangle carries XPoints, YPoints, WidthPoints and HeightPoints in the full layout |
GetTextLine(Index), GetCellGeometry(Index) | Zero-based indexed inspection of prepared lines and stored cells; invalid indices are refused |
Pagination clips fixed printable-area tiles in across-then-down order; a cell or text fragment crossing page boundaries shows up on every intersecting page, with no automatic whole-cell fitting, worksheet print-title repetition or workbook page-setup interpretation
Renderer options and bounds
| Fields | Defaults and meaning |
|---|---|
PageWidthPoints, PageHeightPoints | 595 by 842 points |
MarginLeftPoints, MarginTopPoints, MarginRightPoints, MarginBottomPoints | 36 points each; the margins must leave a positive printable rectangle |
CellPaddingPoints, RasterDPI | 2 points and 96 DPI; DPI shapes PNG dimensions |
PatternDPI | 600 pattern pixels per 72 worksheet points; a finite 36..2400 range, independent of PNG raster resolution |
MaxPages, MaxGlyphs, MaxLines | 256 pages, 2000000 shaped glyphs and 200000 text lines |
MaxLayoutBytes | 268435456 bytes for bounded layout work and raster surface checks |
MaxOutputBytes | 268435456 bytes per rendered output buffer, covering the whole PDF or one SVG/PNG page rather than the sum of separate page files |
MaxFontBytes | 134217728 bytes across explicit font input files for a layout |
MaxShapedCharacters, MaxDrawOperations | 16000000 each, bounding shaping work and page-by-cell drawing work |
Invalid or non-finite geometry and nonpositive work budgets are refused; page dimensions are capped at 100000 points and raster DPI at 1200, with further byte, count and raster-area checks before rendering
The native process-wide font-byte pool additionally allows no more than 256 distinct buffers and 256 MiB; exactly identical bytes may share storage, and capacity is released only when the actual Cairo-owned font face lets go of its buffer
Free each layout once finished; the library does not reset shared Cairo caches, and a logically completed layout may leave font bytes resident whilst native Cairo still owns a face
Bounded native output staging
Native PDF, SVG and PNG output is generated into a registered temporary file rather than holding the complete encoded payload in a memory stream; the callback enforces MaxOutputBytes before each write
PDF pages stream through the native surface into that stage, whilst page-based SVG and PNG use one completed stage per requested page; the final destination copy uses at most16 KiB per write and allocates no output-sized copy buffer
The temporary stage is closed and released after success, preparation failure, byte-limit rejection, temporary-storage failure or caller-stream copy failure; UTF-8 temporary paths follow the existing native temporary-file policy
Generation completes before a caller stream is touched, preserving its original bytes, size and position on earlier failures; a failure during the final successful-stage copy keeps the caller stream's ordinary nontransactional I/O contract
File output keeps its existing publication policy: existing target paths reject, new files are prepared through exclusive sibling stages and publication failure removes only files created by that operation
Temporary disk space grows with the encoded output under the configured byte limit; file publication can briefly need both the encoded spool and its sibling destination stage, and unavailable or exhausted temporary storage rejects before publication
Prepared layout, captured source, fonts, raster surfaces and native backend working memory keep their existing separate limits; this change bounds encoded-output staging memory rather than promising constant total memory for arbitrarily growing source models
The retained Linux8/32/128-page controls grow encoded PDF output from about1.6 MB to25.3 MB; final-copy Pascal heap growth stays at464 bytes, against1.9 MB through31.7 MB for the former memory stage
The same macOS ARM64 controls keep560 bytes of final-copy heap growth, both backends write at most16 KiB per destination call and all504 baseline or candidate pages independently match their source image pixels
Write output and handle failures
SaveToStream(Stream, Format, PageIndex = 0) writes every page for PDF, requiring PageIndex = 0; SVG and PNG write the selected zero-based page
Snapshot serialisation and native rendering complete in private bounded buffers before copying to the destination stream; validation or render failures leave it intact, but a caller stream write failure can leave partial bytes and follows that stream's own failure behaviour
Save(FileName, Format) writes one PDF file or one SVG/PNG file per page and hands back their paths; multipage filenames insert -0001, -0002 and later suffixes before the extension
Existing file or directory destinations are refused; each save stages every page, publishes exclusive new destinations and removes its own staged/published outputs on failure
The filesystem has to support the native exclusive staging and link publication operations; separate PDF, SVG and PNG saves are separate operations and form no combined transaction
Standalone Linux consumer
Tests/Portable/RenderPortableSnapshot.pas is a complete consumer that loads a snapshot, prepares one layout and saves all three formats; build it on Linux with the portable units and native libraries in place
fpc -Mdelphiunicode -Fu/path/to/HotXLS/Lib RenderPortableSnapshot.pas ./RenderPortableSnapshot report.hxrs /srv/output/report fonts.tsv 595 842 96
fonts.tsv is UTF-8 text carrying four tab-separated fields per mapping: family alias, absolute Linux font path, face index and one of regular, bold, italic or bolditalic
Calibri /srv/fonts/Regular.ttf 0 regular Calibri /srv/fonts/Bold.ttf 0 bold Calibri /srv/fonts/Italic.ttf 0 italic Calibri /srv/fonts/BoldItalic.ttf 0 bolditalic
Use genuinely installed or application-supplied font files, and pick a new output base since existing destination files are refused; include extra same-style fallbacks for scripts the first mapping does not cover
Stream := TFileStream.Create('report.hxrs', fmOpenRead or fmShareDenyWrite);
try
Snapshot := LoadXLSPortableRenderSnapshot(Stream,
XLSDefaultPortableRenderLimits);
finally
Stream.Free;
end;
Options := XLSDefaultPortableCairoOptions;
Layout := PrepareXLSPortableCairoLayout(Snapshot, Fonts, Options);
try
Files := Layout.Save('/srv/output/report.pdf', xpcfPDF);
Files := Layout.Save('/srv/output/report.svg', xpcfSVG);
Files := Layout.Save('/srv/output/report.png', xpcfPNG);
finally
Layout.Free;
end;
Cached chart recording
XLSRecordCachedChartScene in lxPortableChart, also exposed through the existing lxPagination entry points, records the existing chart layout renderer's point-based primitives into an immutable portable scene form; its source has to be a detached TXLSXChart that owns no worksheet and carries no preserved native XML, so recording cannot resolve worksheet references or refresh workbook caches
The established single-primary-group subset takes in column, bar, line, scatter, pie, doughnut and plain single-series area charts; the bounded combined-chart profile also supports represented primary/secondary Column, Line and Area groups, multiple Area series and concentric Doughnut rings, with finite numeric caches and strictly increasing bounded indices; scatter category caches contain numeric X coordinates, whilst the other families use stored category labels
Column, bar, line and area value caches must carry contiguous zero-based indices; sparse category value gaps are refused, and recording never expands missing indices into a large array
Bar plots keep horizontal geometry and categorical labels; pie and doughnut plots use category legends, honour FirstSliceAng and HoleSize and omit numeric axes, whilst ordinary single-series area plots keep a filled polygon around the zero baseline
Line and scatter series support independent line visibility, explicit RGB colour and point width via LineVisible, LineColorRGB and LineWidthPoints; LineStyleSet, LineColorSet and LineWidthSet tell explicit settings apart from inherited defaults, and EffectiveLineVisible resolves the existing fill-only series convention
Markers support explicit Circle, Dash, Diamond, Dot, Plus, Square, Star, Triangle and X, or None; the qualified combined Line profile takes global-series nine-symbol Auto cycle, whilst existing single-profile behaviour keeps its own defaults; declare MarkerSet for an explicit MarkerSize from 2 through 72, and use MarkerFillSet and MarkerBorderSet to tell an explicit black RGB value of zero apart from automatic colour selection; connecting segments are painted before opaque data markers
Explicit marker borders lacking a stored width use the ordinary 0.75-point line, whilst legend samples cap circle diameter at 6 points; requested title fonts are written on the actual rich-text run as well as its default text properties, keeping their visible size, colour and emphasis when Excel exports the chart
Unsupported chart families and combinations outside the bounded combined-chart profile, Pie plots with several series, gallery styles, rounded corners, unrepresented date/logarithmic profiles, unsupported axis number formats or crossing profiles, rotated text, trendlines outside the bounded cached-model profile, error bars outside the bounded primary Line/Scatter profile, hierarchical categories, unsupported label settings and missing value caches raise EXLSPortableRender before rendering
Custom value-axis tick fonts, minor grids, explicit major/minor units, invalid explicit series colours and unsupported axis positions are refused; bar legends currently demand the ordinary right-hand placement, and circular plots demand a finite nonzero cached total and bounded geometry with an early conservative reservation for arc scratch storage
The returned array keeps primitive drawing order, explicit colours, fonts, text alignment, opacity and chart clipping bounds; item, byte and text accounting includes conservative renderer scratch reservations, and cooperative cache checks come before scratch array allocation
XLSValidateCachedChartSceneModel runs the same bounded cache and appearance preflight on a model without resolving worksheet cells; the XLSX capture bridge uses this check before cloning and records supported authored chart models with local one-dimensional A1 references, physical native anchor offsets, range clipping and drawing order
The platform-neutral recorder lives in lxPortableChart; the existing lxPagination entry points share the same layout and primitive recording bodies, keeping the Windows renderer's behaviour and matching immutable scene bytes and budget accounting for each supported family
Native Linux and macOS Workbook capture uses the explicit geometry overload described below; imported series RGB fill, plot-area background, chart background and chart border are recovered from their own namespace-resolved shape properties so that a nested series colour cannot overwrite the plot background
Imported preserved ChartML is taken only when its namespace-expanded element, attribute and significant-text stream match the supported typed reconstruction; namespace aliases and attribute order normalise, whilst unmodelled native extensions, foreign attributes and unsupported appearance are refused conservatively
Raw XML and reconstruction scratch budgets are checked before any cloning and projection work; only the detached copy clears its validated preserved XML, and the source keeps native metadata, cell storage, cache contents and generation
Capture walks the underlying OfficeArt drawing order, chart frames absent from the public Shapes wrapper included, and refuses an intersecting unsupported frame rather than silently omitting it
Qualified chart primitive categories
The portable chart path has finite supported profiles for every principal primitive category: data labels, calendar and positive logarithmic axes, explicit marker families, major/minor ticks, trendline curves and error bars
These contracts have actual emitted scene or PDF output and independent native witnesses; the corresponding sections keep their source, formatting, axis, font, placement and numeric limits
Calendar/log composition, arbitrary rich labels, all fonts and families, every combined-axis interaction and whole-image equivalence are not universal capabilities; combined groups and automatically derived stored layout keep their separate contracts
Combined charts, Area groups and Doughnut rings
The portable combined-chart topic describes the qualified modern typed-model path through authoring, editing, saving, reopening and public workbook capture, with separate primary/secondary value domains and a stable group paint order
Multiple ordinary, stacked and percentage Area series keep group-local signed boundaries, and Doughnut series form inner-to-outer rings; exact preserved-native-appearance checks remain enabled, and arbitrary native imports, broader axis/layout profiles and complete image-layer equivalence remain separate work
Explicit linear trendline label rendering
Portable capture emits actual equation and R-squared text primitives for one primary Scatter series with one linear trendline, explicit finite numeric axes, no legend or title, and automatic titles switched off explicitly
Set the owned LabelLayout to explicit edge X/Y coordinates in [0,1) relative to the complete chart frame, without a layout target or width/height overrides; the measured label in full must fit inside that frame
Set LabelTextStyle explicitly to plain black Arial at 10 or 14 points, LabelNumberFormat to General and LabelSourceLinked to false; rotation, bold, italic, underline and strikeout sit outside this rendering profile
Equation and R-squared switches work independently or together; R² keeps its U+00B2 character in a plain font run, whilst polynomial and exponential superscript-run layout remains separate work
Typed style-0 charts may use this profile; the native image qualification covers represented style 2 with the existing Arial 10-point chart default and supported black/white theme endpoints
A stable geometry provider supplies the selected font metrics, and invalid provider identity, nonfinite metrics, unsupported layout or insufficient space refuses capture before any output
The native-qualified label envelope uses the complete chart frame, observed horizontal padding and a bounded Arial line-height profile; eight actual native input or saved-output cases pass independent extent/centre and glyph-ink checks across two font sizes and three chart dimensions, without a whole-chart image equivalence claim
The label layout and text-style children keep owner attachment, deep cloning, write-lease guards and generation tracking; represented layout, font, number-format and source-link state takes part in ordinary saving and semantic snapshots
LabelAppearanceSupported reports the bounded import audit and is broader than the rendering profile: represented bold, italic, single underline, single strike and precise RGB can persist whilst remaining unsupported for rendering
Malformed RGB, unsupported decoration variants, invalid XML Boolean values and duplicate label siblings retain an unsupported appearance state; unchanged raw charts can still save, whilst a reconstruction or raw removal refuses writing rather than normalising that state
Automatic/factor placement, arbitrary fonts, rich equation runs, combined groups, additional trendlines, broader plot-layout equivalence and Classic label projection remain outstanding requirements
Independent labels for two Scatter series
The explicit linear label profile also admits exactly two primary Scatter series with exactly one linear trendline apiece and at least one equation or R-squared switch enabled per series
Each series retains its own paired numeric X/Y cache, fit, display switches, font and explicit label anchor; both axes demand finite explicit minimum, maximum and positive major-unit values
The existing plain black Arial 10/14-point, General/unlinked number-format, edge-anchor, title/legend and metric-provider constraints stay in force; each label in full must fit inside the chart frame
Saving an enabled label writes both equation and R-squared switches explicitly, the disabled value included, so native Excel keeps equation-only and R-squared-only edits; ordinary trendlines with both switches disabled keep their existing output
The native/Cairo qualification compares complete boxes and isolated glyph ink at explicitly requested anchors; the renderer invents no automatic overlap avoidance, and whole-chart image equivalence is not established
Three or more series, multiple trendlines per series, a missing second visible label, combined or secondary axes, automatic placement, unqualified fonts and richer label profiles remain outstanding requirements
Computed equation and R-squared text
XLSTrendlineEquationLabel in lxStandard takes the trendline kind, polynomial order, an open array of TXLSTrendlineLabelPoint X/Y records and the equation/R-squared switches
The original signature stays available; the new overload also accepts InterceptSet: Boolean and Intercept: Double before its EquationText and RSquaredText output arguments, covering represented fixed Linear, Exponential and Polynomial intercept handling
Default text matches the retained native populations using bounded fixed/scientific formatting, trimmed decimals, omitted unit variable coefficients and explicit signs; exponents stay plain text, whilst the R-squared prefix contains U+00B2
Workbook semantic snapshots use the owning plot group's chart family: ordinary Line fits use the original 1-based category position even for numeric labels, whilst Scatter/Bubble fits demand matched numeric X values; blank Y samples are omitted without compacting later indices, and malformed nonblank numbers do not become zero samples
Represented fixed intercepts now participate in computed semantic text; EquationText and RSquaredText remain ordinary UTF-16 canonical properties, so this correction introduces no new snapshot wire format
Moving Average yields no equation or R-squared text even when stored display switches are true; a constant Y population produces the observed constant equation and R² = #N/A, whilst a nonconstant Y population with a zero-slope fit produces R² = 0
For the qualified Linear fixed-zero-intercept population, R-squared uses the observed uncentred residual convention; the other represented fits keep their native fitted-versus-actual correlation behaviour
Undefined families, unsupported fixed-intercept forms, invalid orders or logarithmic domains, insufficient samples, nonfinite inputs and singular fits return false rather than publishing partial strings; point and intercept magnitudes are bounded to 1E50 and fitted values stay finite within 1E100
Centred/scaled Polynomial solving and incremental Linear/R-squared accumulation reduce cancellation; the qualification covers 24 new native controls and five retained oracle populations, with independent semantic decoding and matching Windows/Linux shared text
Custom label number formats, broader sparse error/text populations, all ill-conditioned high-degree or large-offset inputs, Classic computed-label projection and broader independently rendered label geometry remain outstanding work
The explicit linear Scatter profile below adds portable equation-label layout and native-qualified Cairo label output; richer superscript runs and automatic label layout remain outstanding work
Native Classic linear trend curves
Represented Excel-authored Classic Line and Scatter charts expose their auxiliary trendline series as trends of the actual parent, leaving the data-series count separate
The qualified linear curve path uses the existing declared-appearance view with explicit chart dimensions, plot rectangle and represented linear axes; literal line colour and width come from validated stored paint
Portable capture reads current worksheet source values and recomputes the fit after editing; ordinary workbook saving and reopening preserve the original native chart record stream, including multiple qualified trends of one parent
Stored native future properties are executable only when complete paint mirrors and neutral text match the represented core profile and owner scopes; unknown records, different paint, marker contexts and malformed references are refused
This projection contract covers native metadata reading and raw-preserving workbook saving; the distinct bounded native linear builder qualifies public authoring and reconstruction without widening this portable adapter profile
Native rich equation labels, automatic plot layout, whole-chart pixel identity, nonlinear Classic imports and broader fixed-intercept, forecast, axis and legend combinations stay outside this qualified path
Portable cached Line and Scatter trendlines
XLSRecordCachedChartScene accepts represented trendlines on caller-authored or detached primary Line and Scatter models with complete numeric value caches and the existing explicit appearance declarations
The six supported families are linear, exponential, logarithmic, polynomial of order two through six, power and moving average; an explicit fixed intercept is supported for linear, exponential and polynomial fits, with an exponential fit requiring a positive intercept
Line regression uses one-based category ordinals whilst the plot keeps its between-category or on-tick placement; Scatter uses actual cached X values, and forward/backward forecasts use those X-axis units rather than average sample spacing
Moving averages use complete contiguous windows with a period of at least two and below the point count; gaps are not bridged, and moving averages do not combine with fixed intercepts or forecasts
Curves use bounded adaptive polyline subdivision with quarter-, half- and three-quarter-point error checks against a 0.02-point target, a maximum depth of twelve and clipping of each complete segment to the plot; numeric-domain, singular-fit, subdivision or resource failures never publish a partial scene
Each series permits up to sixteen trendlines within the existing cache item, byte, text and scene limits; input coordinates and values are finite with absolute magnitude at most 1E50, forecast lengths are finite within zero through one million, and extrapolated values must stay within the finite numeric profile
Independent trendline line appearance
TXLSXChartTrendline and error bars expose the shared TXLSXChartLineAppearance properties: LineColorRGB, LineWidthPoints, LineColorSet, LineWidthSet, LineVisible, LineStyleSet and read-only LineAppearanceSupported
Represented solid RGB or cached system-colour strokes recover their own point width and visibility rather than taking another trendline's or the series' explicit style; the default trendline width is 1.25 points and the existing error-bar default stays 0.75 points
Authoring, unsaved portable capture, saving, reopening and chart copying keep independent line ownership; hidden lines emit no trendline stroke, retain restoration metadata and accept colour or width edits that become visible when restored
Setting LineStyleSet := False explicitly clears the stored line profile and restores the default; clearing an individual colour or width flag releases that override, whilst cloning keeps all appearance and hidden-restoration state independent
Unrepresented dash, theme or other stored line profiles remain opaque with LineAppearanceSupported = False; unrelated edits preserve their XML, portable capture refuses them and setting individual RGB or width properties does not silently throw away that unsupported state; explicitly reset the complete profile before replacing it
Typed appearance recovery also works with PreserveUnsupportedParts = False; the chart reader makes one copy of the forward-only ZIP entry for recovery and then lets go of retained opaque chart XML according to that preference
Library setters accept finite positive widths up to 1584 points, rounded to an EMU; the bounded portable scene profile accepts represented visible trendline widths up to 100 points, within the existing plot, family and scene caps
The actual native input verifies RGB and width projection for 28 stored trendlines; an exact native line subtree transferred into a supported chart fixture verifies the capture lifecycle, without claiming that all 28 complete native charts meet the portable layout profile
Stored OOXML trendline editing
Stored OOXML trendlines now project their represented type, name, polynomial order, moving period, forward/backward lengths, fixed-intercept presence and value, and equation/R-squared display flags into the public series model ahead of its preserved-XML fingerprint capture
Chart namespace aliases and the default chart namespace are recognised, whilst direct-child depth and namespace checks isolate trendline labels and foreign attributes from series caches, names and plot layout
New and edited trendline names use the schema c:name child; older library c:tx/c:v names remain readable and normalise after public editing, with XML text escaping retained
Unknown, missing or empty type tokens keep their original value and presence through cloning, public name edits, saving and reopening; they do not become linear, and an explicit supported TrendlineType assignment replaces that raw state
All six families on the qualified Line/Scatter profiles retain actual worksheet scene geometry through save/reopen, and supported fixed-intercept edits change that geometry after another save/reopen; native-model field recovery on its own does not establish native appearance or equation-label rendering
The represented trendline defaults to the resolved series colour and a 1.25-point stroke, with independent represented appearance described below, and requires the legend to be hidden; equation and R-squared labels outside the explicit linear Scatter profile, date/logarithmic-axis combinations, secondary or combined groups, Classic projection and arbitrary imported appearance outside the exact typed XML projection stay unsupported
Represented independent line edits can be captured before saving; other unsaved changes to a preserved native chart stay subject to its exact raw/model appearance guard
Independent native curve controls cover all six families, uneven Scatter X values, category placement, fractional forecasts, fixed intercepts, clipping and polynomial fitting; native line width and anti-aliasing are included in the raster comparison tolerance, which does not establish full-page pixel or printer identity
Classic cached charts with declared appearance
Classic BIFF8 capture supports the seven ordinary chart families above when their core records, local stored values, explicit linear scales and appearance are representable; it reads retained records and the available formula caches without evaluating formulas, expanding sparse storage or cloning compiled formula trees
Use TXLSWorkbook.CreateReadOnlyViewWithChartAppearance(Source, Limits, Geometry) to create a separate read-only view with a frozen set of TXLSClassicChartAppearanceDeclaration values supplied by IXLSClassicChartAppearanceSource; Geometry is optional on Windows and provides explicit native font measurements on Linux or macOS
TXLSClassicChartAppearanceDeclarations is the dynamic array of primitive declarations an application can use to implement that source
Pass that configured view to CaptureXLSPortableViewRenderSnapshot(View, SheetIndex, Row1, Col1, Row2, Col2, Limits); coordinates are one-based and the adapter restores the caller's active worksheet once capture finishes or refuses
The ordinary capture entry points still refuse unresolved effective Classic layout or legend fonts; the distinct view entry point uses the already frozen declarations and geometry provider
| Declaration member | Contract |
|---|---|
Generation, SheetIndex, ObjectId | The pinned workbook generation, one-based worksheet index and the actual stored chart object identity; stale generations, missing or repeated identities and identities belonging to another object are refused |
HasChartSize, ChartWidthPoints, ChartHeightPoints | An explicit finite positive chart-frame size in points; it keeps the stored anchor origin and drawing order, whilst a false flag sticks with the anchor-derived dimensions |
HasPlotInnerRectangle, PlotInnerRectangle | An explicit inner plotting rectangle leaving out labels and axis titles; it is required on this declared appearance path |
HasTitleRectangle, TitleRectangle | An explicit title rectangle where the chart has a title; source text, font family, emphasis and colour still come from validated core records |
HasLegendRectangle, LegendRectangle | The declared legend bounds when a legend is present |
HasLegendFontSize, LegendFontSizePoints | The caller's explicit effective point size for a present legend; core font family, emphasis and colour are retained |
TXLSPortableChartRectangle | Left, Top, Width and Height are finite points relative to the captured chart frame; active rectangles call for positive dimensions within that frame |
Count, GetCount, ReadDeclaration | The source reports a bounded count and hands back one primitive record for each zero-based index whilst the view is configured; declarations are copied before later capture |
These values are caller-declared appearance, not automatic Excel layout nor inferred font scaling; obtain them from an independently checked source or an application-defined layout and review the output with the explicit native font mapping used for rendering
Explicit frame dimensions and inner plotting bounds must leave sufficient room for the validated axis-label fonts; insufficient label space is refused rather than clipping text or applying a fitted scale factor
Applications keep the workbook owner alive until the view is released; the borrowed view holds a read lease and keeps the declaration source, whilst the resulting immutable snapshot retains neither the workbook nor the provider
Supported core projection takes in literal solid fills, visible solid lines, circle markers, title and legend text, category placement and bounded explicit numeric ticks; automatic scales, unresolved automatic marker appearance, smoothing, unknown rich extensions, foreign or nonlinear series references and unrepresented point styles are refused before output
Declaring geometry or a legend size authorises no ignoring of unknown chart extensions or unvalidated styles; byte, text, stored-cell and scene limits remain effective for retained source data, declarations, detached caches and recording scratch space
The additional XLSValidateCachedChartSceneModel and XLSRecordCachedChartScene overloads take TXLSCachedChartSceneAppearance for a detached model; initialise it with XLSDefaultCachedChartSceneAppearance before setting explicit controls
The lower-level XLSReadClassicChartScene in lxClassicChartScene hands back a caller-owned detached TXLSXChart plus primitive appearance and budget counters from a retained TXLSCustomChart, its exact source calculator and a leased TXLSClassicChartSceneSource; free the returned model after recording
TXLSClassicChartSceneSource.ReadAppearance supplies a primitive declaration, ReadCell reads bounded pinned local stored values, ReadFont fills the supplied text style with bounded effective core font data, and PaletteColor resolves explicit stored palette entries; application implementations must preserve the pinned source and honour every supplied byte and character quota
The same TXLSClassicChartSceneSource surface supplies the scene's pinned identity and retained font evidence: ReadGeometry returns the leased render geometry, ReadGeneration the workbook generation the scene is pinned to, HasArial10FontProof, HasArial12BoldFontProof, HasArial10NormalProof and HasAutomaticNormalProof report retained automatic-font proofs, ReadAutomaticFontRecord(FontIndex, MaxBytes, UsedBytes) copies one bounded stored font record, and the two ReadDefaultStyleAccent overloads resolve a series' default theme accent, with the series owner validated in the two-argument form
ReadDefaultStyleThemeColor(Slot) resolves a default-style theme colour by semantic slot, with slot 0 standing for the source dk1/default tx1 regardless of the model's theme slot indexing; the base source raises, since a detached scene has neither a current theme nor a recipient colour source
TryReadEmbeddedContext(Limits, Context, UsedBytes, UsedCharacters, UsedItems) answers an optional owned TXLSClassicChartEmbeddedContext within the supplied byte, character and item budgets; the base implementation returns False with zeroed counters, so existing custom sources keep an unavailable default until they provide one
| Scene appearance member | Meaning |
|---|---|
SeriesMarkerSizePoints | Bounded per-series point diameters, fractional values included; zero keeps the model's marker size and a nonzero override must run from 2 through 72 points |
OverrideBorder, BorderColorRGB, BorderWidthPoints | Explicit chart-frame outline appearance |
AxisColorRGB, TickColorRGB, GridlineColorRGB, AxisWidthPoints, TickWidthPoints, GridlineWidthPoints | Explicit axis, tick and major-grid paints and point widths |
AreaFillOpacity, SeriesFillAlpha | Area opacity and series fill alpha |
UseAxisTickControls, CategoryBetween, Dates1904 | Validated explicit axis controls, categorical placement and the detached calendar input epoch; initialise the appearance record before setting controls |
UseAutomaticAxisCrossings | Explicit linear major/minor ticks and ordinary zero crossings clamped to each numeric domain; it requires UseAxisTickControls and defaults to False |
UseErrorBarControls, ErrorBarColorRGB, ErrorBarWidthPoints, ErrorBarCapWidthPoints | Bounded primary Line/Scatter errors with explicit paint; the defaults are disabled, black, 0.75-point stems and 4.5-point full caps |
TitleOffsetXPoints, TitleOffsetYPoints | Finite offsets applied to the recorder's ordinary title position |
OverridePlotInnerRectangle, OverrideTitleRectangle, OverrideLegendRectangle, PlotInnerRectangle, TitleRectangle, LegendRectangle | Literal point rectangles relative to the chart frame |
PieRadiusRatio | Circular-plot radius as a bounded fraction of the smaller plot dimension |
Chart primitives follow HotXLS's existing layout policy; chart gallery appearance relying on Excel's unmodelled defaults remains an explicit unsupported boundary
Explicit chart marker families
Line/scatter plot points and legend samples use the existing TXLSXChartMarkerSymbol values and common recorder, with explicit finite geometry and existing item/byte budgets; initialise a supported cached model and set MarkerSet when selecting a family
| Symbol | Geometry |
|---|---|
xlsxMarkerAuto, xlsxMarkerCircle | Existing circle geometry and default paint behaviour |
xlsxMarkerSquare, xlsxMarkerDiamond, xlsxMarkerTriangle | Closed filled polygon with the supported marker outline |
xlsxMarkerDash | Full-width bar with one-fifth marker height |
xlsxMarkerDot | Half-width short bar centred on the point anchor |
xlsxMarkerPlus, xlsxMarkerX | Filled background square with foreground cross strokes |
xlsxMarkerStar | Filled background square with two foreground diagonals and a vertical stroke |
xlsxMarkerNone | No marker when MarkerSet is enabled |
An inactive MarkerSet=False keeps the existing automatic circle even when a dormant symbol stores None; unknown enum values and explicit sizes outside2..72 continue to reject
Classic source records map explicit marker identities0..9 to the same public families; the existing declared appearance path keeps record ownership, colour, size, flags and point-style validation without resolving unknown automatic styles
An explicit Classic no-marker record enables the None setting so plot points and legend samples emit no marker; this is distinct from a caller's inactive marker setting, which hangs on to its existing automatic circle
These primitives use independently checked native marker-local shape, foreground and background behaviour;32 new plot/legend instances differ in extent by less than0.003 pt in the retained control
Default circle snapshot bytes stay identical to the preceding circle implementation, and scenes retain ordinary serialization/reload and output limits; no public API, snapshot version or native dependency changes
Automatic chart-wide axes, plot/title/legend layout and unresolved per-point styles remain separate boundaries; represented data labels are described below, whilst the bounded date/log profiles below extend ordinary primary axes; the explicit linear tick and error profiles below extend these controls; automatic scales and other tick profiles remain separate work; caller-authored cached trendlines follow the profile below
Explicit linear ticks and crossings
Primary Line and Scatter charts accept explicit finite numeric minimum and maximum values, a positive major unit and ordinary zero crossings clamped to the declared domain whenever UseAxisTickControls and UseAutomaticAxisCrossings are enabled
Major and minor positions use minimum plus an integer multiple of their own unit; coincident minor positions are omitted, next-to labels follow the crossing axis, and Line categories keep their categorical boundary
Each unit must lie within 1E-100 through 1E100 and at least abs(minimum)/1E12; the bounded profile allows at most 12 X major ticks, 14 Y major ticks and 48 candidate minor positions per numeric axis
Active minor marks or grids need an explicit positive minor unit; major marks reach three points and minor marks two points, with the represented inside, outside or cross placement
Modern source capture selects this context for represented explicit linear controls; default detached callers keep their previous behaviour until they enable it
Automatic scale or tick selection, reversed axes, user-selected crossings, non-nextTo label placement, non-General numeric formats, categorical minor ticks, other chart families and date/logarithmic minor controls stay unsupported
Bounded portable error bars
Primary categorical Line supports Y errors, and primary Scatter supports X and Y errors, with explicit linear bounds and major units; switch on UseErrorBarControls together with both axis-control fields for detached scenes
Fixed errors use the non-negative magnitude on both sides; percentage errors use abs(point value) times the percentage divided by 100, including negative and zero data
Standard deviation uses the sample denominator N-1 and centres each error group on the series mean, multiplied by the declared magnitude; standard error centers on each plotted value and uses sample deviation divided by sqrt(N), independently for each series and Scatter axis
A single-point statistical series emits no error ink; with at least two points, zero variance or a zero multiplier keeps coincident caps and a zero-length stem
Custom scalar errors use independent non-negative PlusValue and MinusValue magnitudes broadcast to every plotted point; one-point numeric literals keep each side separately
Structured OOXML output writes the standard cust token and the standard numeric val attribute; the reader also accepts the historical custom alias and the text-valued scalar form for compatibility
Supported custom references and multi-point literals retain independent side identities as described below; missing, malformed or otherwise unrepresented data stays explicitly unknown rather than becoming zero, and structured edits refuse until applicable sides have a complete supported representation
Unchanged raw preservation may keep the historical invalid token; a structured scalar edit or explicit rebuild emits canonical output
Magnitudes must be finite and within zero through 1E100; each raw point and error endpoint must fit the explicit domain, and statistical caches must hold finite paired numeric values without missing entries
Paint uses a 24-bit RGB colour, a positive stem width at most 4096 points and a full cap width from zero through 4096 points; NoEndCap suppresses both caps, and a zero-width cap has no ink
The plot rectangle physically clips stems and caps without changing their original coordinates; boundary cap overhang is accepted, whilst points or error endpoints outside the domain still reject
Default source projection rejects unrepresented styles, unknown attributes and unrepresented side metadata before scene publication; detached caches and paint are copied before measurement callbacks, with the existing read lease and resource budgets kept in place
Unsupported point/cache correspondence, unrepresented error line styling, secondary axes, date/log combinations, missing statistical points and other error-bearing families stay unsupported
Native controls and independent scene/PDF checks qualify tick positions, sample conventions and error geometry; they establish no complete native chart, font, grid paint or page-layout equality
Per-point custom error references and caches
TXLSXChartErrBar exposes independent PlusRange, MinusRange, PlusCache and MinusCache properties for numeric local references and literal arrays; both caches are owned by the error bar and callers must not free them
A numeric cache takes priority over that side's scalar property; one point at index zero broadcasts, while an array must have exactly the plotted point count and contiguous zero-based indices
Each applicable magnitude must be finite, nonnegative and at most 1E100; independent X/Y and positive/negative values may be zero, whilst missing, sparse, duplicate, mismatched, nonnumeric or nonfinite applicable values reject
Assigning a scalar side clears its old range and cache even when the scalar equals its stored value; assigning a different nonempty range clears stale cache values, whilst clearing a range keeps the cache as a literal array
Actual capture reads existing caches under its read lease and resolves no references nor recalculates source cells; after source edits, explicitly use Series.RefreshDataCaches or the existing structured-save refresh path to update derived values
Each nonempty captured reference must name an available local sheet, use a one-dimensional A1 range and match the cardinality of its cache; external references, unsupported expressions and hidden-source filtering that changes correspondence remain unsupported
Structured custom output preserves numeric reference formulas, numeric caches and literal arrays, validating syntax, cardinality, indices and magnitudes before replacing a chart definition; unchanged opaque imports keep their separate raw-preservation contract
Clone deep-copies both caches and the reference strings, semantic identity includes optional payloads, and collection Add/Clear, point edits and range setters use the owning workbook's write guard
Cache points, strings and retained inactive payloads are charged to the existing item, text and byte limits before detachment; a fixed 512-byte per-error container allowance and the existing per-point scratch envelope cover the bounded preparation
Prepared points copy all four magnitudes before external callbacks, using broadcast or binary lookup without a fresh payload-sized error array; each side's endpoint is validated against its explicit domain
This profile extends the represented error data without taking arbitrary native chart appearance on board; a native chart with active minor ticks but no explicit minor unit still refuses even when its error data is supported
Single-sided error bars
TXLSXChartErrBar.BarType uses TXLSXChartErrBarType values xlsxErrBarBoth, xlsxErrBarPlus, xlsxErrBarMinus and xlsxErrBarUnknown; caller-created error bars default to Both
Primary linear Line Y and Scatter X/Y profiles keep the selected side for fixed, percentage, standard-deviation, standard-error and represented scalar or cached custom errors, with the same explicit bounds, finite data, sample and plot-clip requirements
Fixed, percentage, standard-error and custom single-sided stems run from each plotted point through to the selected endpoint; standard-deviation stems run from the sample mean to its selected mean plus or minus the declared multiplier times sample deviation
Only the selected endpoint has a cap, with no extra cap at the stem origin; NoEndCap still suppresses it, and a zero custom magnitude keeps its cap whilst the zero-length stem has no PDF ink
Only the applicable custom side needs a complete reference/cache or finite scalar and takes part in endpoint bounds checks; inactive payloads still charge the existing retained-item, byte and text budgets before detachment
Standard output keeps the selected errBarType and emits only applicable custom side data; a title-only edit no longer silently converts valid plus/minus input to Both or rejects a legitimately absent inactive custom side
An absent, unknown or incorrectly cased required errBarType imports as Unknown, keeping unchanged opaque XML whilst refusing a structured rewrite; an out-of-range public enum assignment refuses without changing the current selection
Clone and assignment keep the side, nondefault semantic identity records it, and its setter honours workbook write guards; default Both identity and existing portable snapshot formats remain unchanged
The side is prepared before measurement callbacks and adds no payload-sized allocation; unrepresented error line styling, secondary/date/log errors, other families and automatic error domains remain separate unsupported profiles
Hidden error lines and restoration
TXLSXChartErrBar.LineVisible defaults to True; hiding a represented line stores its current appearance as a restoration memento, emits no error ink and preserves independent main/restoration component presence, widths and colours
Making the line visible promotes the represented memento into the main line and drops the restoration extension; hiding an already visible line recaptures the current main line instead of reusing a stale ignored memento
While hidden with a memento, the existing color/width properties expose that restoration appearance; explicit HotXLS setters update the stored memento, and clearing component flags cannot bring stale raw properties back
This explicit stored edit is separate from Excel COM editing a hidden line: the retained native control leaves its old memento unchanged, whilst actual HotXLS writer outputs restore their edited mementos when Excel makes the line visible
Standard DrawingML system colours require a complete six-digit lastClr cache; saving keeps the system name and cache, whilst portable paint uses the cached RGB and does not promise the recipient operating system's current palette
LineStyleSet := False remains the explicit full reset of main/restoration metadata and unsupported identity; opaque profiles preserve unrelated edits and refuse direct changes until that reset happens
Imported source shapes whose inherited empty appearance is not represented still refuse portable capture until an explicit reset and reauthoring; no unknown appearance is quietly flattened
Supported unsaved line edits can be captured directly without an intermediate save: exact projection comparison excludes only the changed supported error-shape owner and keeps validating all remaining chart content and all skipped-node budget consumption
Capture keeps the source semantic bytes unchanged, isolates X/Y owners and holds on to write leases; hidden restoration widths may keep legal stored values above 100 points because they emit no stroke, but making such a line visible refuses before recording returns a scene
The represented error object and its three finite system-name allocations fit the existing 512-byte model reservation; this adds no arbitrary retained XML or per-point overhead
Stored error-bar line appearance
Primary linear Line Y and Scatter X/Y error bars retain independently present RGB colour and width for each error direction; with UseErrorBarControls enabled, represented stored components override the corresponding caller fallback and absent components hang on to that fallback
TXLSXChartErrBar exposes LineStyleSet, LineColorSet, LineWidthSet, LineColorRGB, LineWidthPoints and read-only LineAppearanceSupported; setters honour workbook write guards and clones keep independent state
Widths are positive finite points, quantised once to integer EMU with Round(points * 12700), from one EMU through 1584 points; values that round below one EMU reject without mutation, and RGB values must fit six hexadecimal digits
Portable scene recording accepts effective error widths through 100 points and rejects larger stored or fallback widths before returning a scene; valid stored widths above 100 points stay available for workbook reading and writing
The represented XML shape keeps one main DrawingML line, independently present width/colour components, optional cached system-colour identity and a supported hidden-line restoration memento; shape solid fill, round joins and an empty effect list retain their represented identities
Clearing LineColorSet or LineWidthSet removes only that stored component when saving; the raw XML merge cannot restore a cleared component
Setting LineStyleSet to False explicitly clears the entire shape profile, resets both component flags and permits replacing an unrepresented source profile
Unrepresented shapes stay intact during ordinary saves and unrelated title edits; direct line changes or reconstruction after discarding their raw source refuse until an explicit full reset, and portable capture still refuses those shapes
Theme transforms, gradient or pattern paints, alpha, custom dashes, alternate joins/caps, nonempty effects and unknown extension metadata sit outside this portable profile; ordinary visible axis, tick, grid, border and series widths now share the same early 100-point scene validation
Cached calendar axes
Ordinary primary-axis Line scenes accept numeric cached date serials with an explicitly represented day, month or year base and major time units; the major unit must be at least as coarse as the base unit, with a whole-number major step from 1 through 1,000,000 and at most 12 generated major ticks
Calendar coordinates preserve equal month and year distances across unequal month lengths and leap years, whilst day coordinates keep chronological spacing; CategoryBetween=True adds half a base-unit interval at each endpoint
Raw serial caches stay unchanged for source identity and tick formatting; modern workbook capture copies the workbook epoch into TXLSCachedChartSceneAppearance.Dates1904 before detachment and enables the explicit axis controls for this profile
Detached callers initialise XLSDefaultCachedChartSceneAppearance, supply the matching Dates1904 value for 1904 serials and enable UseAxisTickControls when requesting explicit numeric value-axis units
The supported calendar formats are empty, General, yyyy-mm-dd, yyyy-mm, yyyy, m/d/yy, mm/dd/yyyy and mmm-yy; invalid dates, exhausted quotas or a thirteenth major tick reject before a scene is published
Automatic calendar units, minor ticks/gridlines, reversed axes, other date chart families, category-name date labels and values needing plot clipping stay unsupported; Classic date-axis projection keeps its existing BIFF grammar boundary
Cached logarithmic axes
Ordinary primary Line Y axes and Scatter Y or X/Y axes accept finite logarithmic bases from 2 through 1000, noninteger bases included, with explicit positive finite bounds from 1E-100 through 1E100
Series segments, markers, data-label anchors, major ticks and gridlines share the logarithmic transform; cached values and value-label text keep the original numbers, and logarithmic Y domains are not forced to zero
Major ticks are integer powers of the represented base with at most 14 powers per axis; the finite/domain and exponent-count checks come before logarithms, powers and integer conversions, and the natural-log span must exceed 1E-12
Modern workbook capture enables explicit axis controls for represented logarithmic axes; a detached Line or Scatter label uses the positive lower bound as its placement baseline whilst keeping its raw value and transformed anchor
Non-positive points currently reject rather than reproducing their native omission/connectivity, and automatic bounds, partial plot clipping, minor ticks/gridlines, reversed axes and custom logarithmic intervals remain unsupported
Column/Bar logarithmic baselines, stacking, secondary groups and combined calendar/logarithmic axes stay outside this profile; the combination is explicitly rejected during model preflight
Calendar and logarithmic source checks finish before caller label measurements, keep the existing cache envelopes and reserve their bounded transform scratch space; resulting snapshots retain no workbook or provider and use the existing snapshot format
These profiles qualify source identities, tick values and normalised native coordinate relationships; they assert nothing about native default smoothing, page calibration, complete layout or pixel equality
Cached chart negative fills
Supported ordinary modern Column and Bar scenes honour represented InvertIfNegative and NegativeFillColorRGB, including clustered and signed stacked bars with data labels
Missing inversion uses the OOXML true default; active inversion without another negative brush paints white with a black 0.75-point outline, explicit false keeps the positive series brush, and a represented negative RGB selects that solid fill
An explicit negative RGB requires a represented positive solid fill; an automatic positive brush combined with a requested negative RGB stays unsupported because native Excel can throw away that negative colour
Negative and positive bars keep the caller-declared SeriesFillAlpha; native brush checks establish RGB and outline behaviour without claiming equality of independently declared alpha, axis or complete chart-layout contexts
Classic non-inverted negative Column and Bar values keep their represented positive brush; inverted Classic appearance, per-point overrides, unknown or transformed negative colours and unsupported chart families still reject
Typed editing, copying and clearing follow the negative-fill series contract; clearing known native properties does not let preserved extension XML restore an old colour, and unrelated extensions keep their own URI identity
Complete Bar category labels
Automatic Bar plots set aside a measured left gutter for complete ordinary category labels through TXLSCachedChartSceneAppearance.DataLabelGeometry; modern workbook capture supplies this context automatically
The plot keeps its right edge and vertical geometry whilst bars, numeric ticks and pending data labels share one horizontal transform; title and legend positions stay unchanged
Manual and explicitly declared plot rectangles stay fixed, and insufficient horizontal or vertical label space raises a fit error; detached calls without the optional geometry keep their previous layout behaviour
Category strings, fonts, plot primitives and pending value labels are detached before caller measurement begins; generation and calibration must stay stable, and returned scenes retain no measurement provider
Ordinary local chart references
Modern chart capture accepts local relative, absolute and mixed A1 cell references and one-dimensional ranges, including quoted worksheet names, lower-case column letters and an optional leading equals sign
Equivalent reference spellings produce the same snapshot, and descending one-dimensional ranges keep their existing compatibility behaviour
Malformed dollar anchors, endpoints outside column XFD or row 1048576, external workbooks, unavailable worksheets, multidimensional ranges, unions and whole-column references reject before any partial snapshot is published
Cached modern chart data labels
Modern cached chart scenes render supported value, series-name, category-name, range-cache and pie/doughnut percentage labels with custom separators, represented numeric formats and the complete immutable source text
Line and Scatter support Center, Left, Right, Top and Bottom; Column and Bar support Center, InEnd and OutEnd; Area supports Center only; Pie and Doughnut support Center, InEnd, OutEnd and BestFit
Defaults put Line/Scatter labels on the right, ordinary Column/Bar labels beyond the value end, Area labels between baseline and value, stacked contributions at their centres, and Doughnut labels midway through the ring; Pie BestFit uses the complete measured rectangle along the slice bisector
| Appearance member | Contract |
|---|---|
DataLabelGeometry | An IXLSRenderGeometry required when recording a nonempty label through the detached appearance overload; the default stays nil |
DataLabelFont | A TXLSRenderFont, default Calibri at10 points, with a family of1..255 code units and a finite size1/64..4096-point range |
DataLabelColorRGB | A24-bit RGB value, default black |
Modern workbook capture supplies its read-only geometry, the workbook minor theme font,10-point size and black colour automatically; detached callers recording labels provide their own measurement context through TXLSCachedChartSceneAppearance
All model text, values and placement inputs are prepared before the first measurement callback; the resulting scene owns only final text, fonts and point bounds and keeps neither the provider nor the chart model
The provider's generation and every calibration field must remain stable during measurement; invalid metrics, source writes, unavailable geometry, caller failures and exhausted item, text or byte budgets reject before the scene is published
Labels reserve a maximum90-point outer width, reduced for a smaller plot, with3-point horizontal and1.5-point vertical padding built in; measured height must fit the plot and the complete measured rectangle stays inside its bounds
Integer nearest-rounded font metrics keep a half-measurement-pixel upper envelope in both label dimensions, with the same allowance deducted from the wrapping budget; short labels such as 100 stay on one line when the real shaped advance falls above the rounded metric
Complete explicit line breaks and long ASCII words are kept; overflow fallback uses the existing logical-advance interface for at most32767 ASCII code units, while complex-script overflow requires a provider returning valid cluster-aware wrapped metrics
Supported number formats are General or the bounded numeric/literal profile with at most1024 code units and four unquoted percent signs; source-linked, date, fraction, bracketed and other unrepresented formats are explicitly refused
The reader retains represented explicit label formats, positions, whitespace-only separators and ordinary stacked grouping/gap/overlap; positive portable stacks use cumulative value domains and honour category overlap instead of forcing all contributions onto the same slot
Graphical legend keys, bubble-size labels, per-point label overrides, PercentStacked labels, unknown imported label styles and Classic BIFF label projection stay unsupported
These rules promise no automatic chart-wide layout, collision avoidance, native pagination or pixel-identical output; automatic Bar plots use the measured category gutter described above
The expanded appearance record requires consumer recompilation; the immutable text primitives and snapshot wire version are unchanged, and scenes without labels keep the prior circle snapshot behaviour
Direct native workbook capture
CreateXLSPortableCairoRenderGeometry(Fonts, Calibration, Generation, Backend, Options, CacheCapacity) returns an IXLSRenderGeometry backed by the same explicit font files, FreeType, HarfBuzz and text shaping that native output uses; column widths come from actual measured maximum-digit width with the workbook calibration
The provider owns detached font bytes and a bounded metric cache, checks font and layout budgets before allocation and validates measurement requests before changing cached state; a full cache can still return uncached measurements without expanding beyond its capacity
Capture verifies that the provider generation and every calibration field match the current read-only workbook view, retains the provider for that view and leaves the workbook's default geometry factory unchanged; ordinary default native geometry stays an explicit GDI boundary
Capture the generation through an explicitly released view before creating the provider; holding on to a temporary interface result can keep its read lease alive until the surrounding scope ends
View := Owner.CreateReadOnlyView; Generation := View.Generation; View := nil; Geometry := CreateXLSPortableCairoRenderGeometry(Fonts, Workbook.CaptureRenderCalibration, Generation, xlsrgbBitmap, XLSDefaultPortableCairoOptions, 4096); Snapshot := CaptureXLSPortableRenderSnapshot(Owner, 1, 1, 1, 30, 6, XLSDefaultPortableRenderLimits, Geometry);
Native consumers compile with LX_PORTABLE_CORE and the corresponding native dependencies; Windows calls to the native Cairo geometry factory are refused explicitly, whilst Windows capture can use its existing geometry factory through the same scoped overloads
Actual native capture supports the modelled scalar, rich-text, supported raster, ordinary shape and seven cached chart families described above; chart capture preserves the original imported ChartML, cached points, sparse cell storage, packed storage and Workbook generation
For immutable print areas, margins, fit or percentage scaling, repeated titles, manual breaks and whole-cell or merged-cell pagination, see portable print plans
Limited automatic Classic chart layout
A validated embedded BIFF8 Line or Column chart can derive its effective object and plot geometry from stored chart and worksheet records with no caller-supplied appearance rectangle
The initial profile demands two primary series, 2 through 16 shared local categories, no title or legend, plain Arial 10, explicit finite integer numeric-axis bounds, no category major ticks and the qualified default Style 2 structures
Worksheet geometry requires explicit visible column widths, lossless quarter-point row heights and the actual Normal font chain, with a bound 120 DPI provider at 100 per cent scaling and an Arial maximum digit width of 9 pixels
A custom Theme version 0 has to pass the bounded complete package, relationship and source-identity profile; application-default themes, unrelated parts, invalid relationships, duplicate owners and unrepresented future properties do not establish that identity
Series colours read the current typed theme accents; qualified source editing, ordinary save and reopen, and typed-accent editing preserve the represented geometry and colours
The scoped custom-theme writer emits a complete five-part theme ZIP with the admitted font collections and source line widths, keeping the native Style 2 series line weight; ordinary saves separately support finite unchanged native Theme persistence, without extending this strict chart-source proof to unknown font or format schemes
Stored Classic charts keep their ordered file font indices during save, whilst chart-free workbooks continue to compact unused fonts; workbook clearing and slot replacement invalidate imported font and theme proof
Independent native comparisons qualify object and plot rectangle components to within 0.75 points, with a measured maximum error of 0.331393 points; actual Cairo SVG and PNG output retains the represented series paint
The qualified Classic automatic profile uses the stored category-text vertical-centre alignment inside its existing 20-point label box; the default remains unchanged for other imported and caller-declared layouts
Actual Cairo output places category text at the independently observed native axis gap for the qualified Line and Column sources, edited save and reopen included, without shifting the image or plot
This finite alignment qualification establishes no whole-chart image equivalence: native canvas-coordinate mapping, Column bar widths and broader label profiles remain separate work
Other fonts and DPI domains, implicit column widths, title and legend layout outside the finite profile below, broader chart families and general future-record checksum validation remain outstanding work; complete caller-declared geometry continues through its existing path
Automatic Classic titles and right legends
CaptureXLSPortableRenderSnapshot can derive effective title, right-legend and plot rectangles for qualified ordinary two-series embedded Line and Column charts using stored records, current worksheet values and current series names; no caller chart, plot, title, legend or font appearance declaration is needed
The existing custom-theme, default-style, worksheet metric and 120-DPI conditions continue to apply; the imported axis and legend fonts are plain black Arial 10, and the title font is black Arial 12 bold with a separately validated stored font proof
The observed homogeneous title and legend rich text, complete future-record owners and source font identities must match the finite profile; arbitrary rich text, font substitution and stale font-slot identity refuse the capture
Effective rectangles come from the existing automatic geometry formulas and current measured text; cached rectangles are validated as input metadata and never become the output positions
The title validates its owned position checksum; right legends currently admit just three independently observed complete core, position-cache, checksum and directly owned Frame tuples for the qualified Line 336 by 195 and Column 480 by 300 point frames within anchor quantization tolerance
The full owned legend Frame participates in that input proof, including its sizing flag; changed checksum preimages, manual positioning and different cache tuples explicitly refuse rather than treating a stale future record as sound automatic positioning
Source edits, series-name edits and ordinary save/reopen preserve the represented layout and fonts; independent original and edited Excel observations cover 224 coordinate components across 16 public scenes within 0.75 points, with a maximum difference of 0.223544 points
This is finite component-level qualification; general legend checksum calculation, other sizes, fonts, DPI domains, auxiliary trendline series, broader families and whole-image equivalence stay separate capabilities
Stored Classic legend directions
Version 2.384.394 extends ordinary CaptureXLSPortableRenderSnapshot to bottom, top and left legends within the admitted two-series Line and Column profile, alongside the existing right-legend path and without caller geometry declarations
The owned layout direction must agree with horizontal or vertical entry flow; the legend position, frame, font chain, source names and the complete cache preimage remain independently validated before layout
The Pos record supplies signed 16-bit values along with separate unused high words; its admitted MDCHART/MDABS mode stores legend dimensions in points
Horizontal layout uses that validated stored width with a measured entry-fit check; moving a current horizontal entry name away from its stored name refuses capture until the names match again or a supported refreshed layout is available
Title, legend and plot rectangles keep the existing finite canvas, text-band and spacing policies, using the current owned source and geometry provider; numeric-source edits, normal save/reopen and detached scene use after source destruction are qualified
Three genuine Excel direction sources qualify 48 training rectangle components at the existing 0.75-point threshold; a separately sealed Column-bottom source first revealed after solver freeze qualifies 16 components along with a maximum difference of 0.142048 points
The final integrated source passes 331 focused and 188 artifact checks, 128 original and library-reopened component comparisons plus eight complete chart-substream byte bridges included; later checks of the revealed source are ordinary regressions
The finite Arial, explicit-grid, qualified custom-theme and 120-DPI conditions remain; arbitrary fonts, implicit grids, general saved-DPI recovery, corner legends and newly reconstructed horizontal name layouts stay unsupported; additional series follow the separate bounded collection profile below
The library-produced files were reopened by the library and keep their native chart packets, but were not newly opened or refreshed by Excel; this does not qualify regenerated native chart caches, per-glyph coordinates or pixel parity
Automatic Classic series collections
The later imported Normal-font profile measures the current source-owned Normal STYLE, style-XF and FONT by way of the recipient geometry provider, taking in the qualified Calibri 11 Normal source; chart axes, title and legend hold on to their separately represented Arial fonts, and explicit stored grid and 120-DPI context requirements still stand
Version 2.384.452 drops the fixed two-series formatting permission from the represented automatic Line and Column parser and takes its actual bounded series collection, bringing independently owned checksums, source theme variations and core-format fallback
See Classic automatic chart series for the newly qualified multi-series sources, the source-free lifecycle and the unchanged font, grid, DPI and geometry limits; the earlier two-series direction studies above keep their own recorded scope
Advanced capture bridge
IXLSRenderCaptureSource in lxSemanticSnapshot is the internal coordination interface implemented by supported read-only workbook views; ordinary applications ought to call the owner-based capture overloads
TXLSClassicReadOnlyWorkbookView and TXLSXReadOnlyWorkbookView implement IXLSRenderCaptureSource, the eight render methods below and the conditional capture method ReadRenderConditionalVisual included; these classes coordinate capture through read-only views, and the adapter manages their lifetime whilst applications retain their workbook owner interface and call CaptureXLSPortableRenderSnapshot
Their existing TryReadCell method supplies a stored-cell snapshot through the read-only view; the render methods add detached appearance and geometry on top for portable capture
| Member or helper | Purpose |
|---|---|
ValidateRenderRange | Checks one-based rectangle bounds and unsupported appearance footprints ahead of capture |
ReadRenderStyle | Returns detached TXLSSemanticCellStyle metadata plus a rich-text presence flag for a one-based cell |
IXLSRenderRichTextCaptureSource, ReadRenderRichText | Optional view extension returning bounded detached TXLSRenderTextRuns; each TXLSRenderTextRun contains Text and an effective semantic Style, using the supplied base style and positive run/byte quotas without materialising cells or modifying style pools |
RenderRowHeightPoints, RenderColumnWidthPoints | Return physical geometry, collapsing hidden dimensions to zero |
IXLSRenderGeometryCaptureSource, SetRenderCaptureGeometry | Optional view extension keeping an explicit provider only after generation and calibration validation; invalid providers leave the retained view provider unchanged |
RenderCellGeometry | Hands back the cell geometry provider the view measures through: the explicit provider retained by SetRenderCaptureGeometry, or the workbook's default bitmap geometry created and cached on first use |
ReadRenderMerge | Reports the complete inclusive one-based merge rectangle holding a cell |
ResolveRenderColor | Resolves semantic theme/indexed/RGB appearance to a portable RGB colour, using the supplied default where supported |
RenderDate1904, RenderRightToLeft | Expose workbook date-system and sheet reading-order context |
XLSRenderCaptureLiteral | Recognises the supported literal Boolean, finite number or simple quoted text subset for capture without evaluation |
XLSRenderCaptureIntersects | Tests whitespace-separated local A1 ranges against a one-based rectangle, refusing unresolved range syntax |
XLSRenderCaptureCondition | Evaluates the supported condition subset against an existing scalar; comparison operator codes 1 to 8 mean between, not-between, equal, not-equal, greater, less, greater-or-equal and less-or-equal |
XLSRenderCaptureApplyDxf | Applies supported detached differential appearance with an AppliedSlots mask to retain higher-priority formatting |
TXLSDxfStyle._MarkRenderUnsupportedAppearance, TXLSDxfStyle._HasRenderUnsupportedAppearance | Internal-prefixed import coordination methods record and inspect appearance the typed differential model cannot render safely; Assign keeps the marker, and capture refuses a marked matching style |
These bridge helpers can raise EXLSSemanticSnapshot; the public capture adapter turns that exception into EXLSPortableRender
Uniform modern textbox fonts
Represented uniform textbox fonts supply the actual family, point size, bold and italic to portable scene capture; retained strings stay part of the existing capture budget
Represented opaque text and outline RGB values are kept; explicit nonopaque text colour refuses capture because the portable text record has no alpha field
This adds no mixed-run layout, script font resolution, arbitrary drawing metadata, new anchors or a whole-image parity guarantee
Combined Cartesian axis roles
The finite combined role profile keeps category versus numeric dimensions, actual crossing baselines, several series and stable layering through normal save/reopen and owned capture
Explicit axis positions, limits, style and inversion boundaries stay part of admission; unsupported metadata or layouts refuse capture before partial output