This file tracks incremental parity work vs the vendored Excelize snapshot in
excelize/.
References:
- Human-written gap summary:
docs/excelize-parity.md - Generated (names-only) report:
docs/excelize-parity-generated.md(regen viapython3 scripts/excelize_parity_report.py --out docs/excelize-parity-generated.md)
- Add/extend MoonBit API (+ docs if needed)
- Add focused tests (prefer snapshots via
inspect) - Run
moon info && moon fmt - Run
moon test(usemoon test --updateif snapshots legitimately change) - Commit with a detailed message and push to
origin/main
Verified gaps vs .repos/excelize found by a codex CLI cross-audit; the
well-scoped ones were fixed on feat/excelize-parity-gaps. Remaining:
- Typed cell values:
Workbook::set_cell_time/set_cell_duration+time_to_excel_date(feat/excelize-parity-round2) - Stream writer typed rows:
StreamWriter::new_time_cell/new_duration_cell(feat/excelize-parity-round2); nil/blank stream cells skip via StreamCell::new_blank() (feat/parity-round3) - Default charset transcoding: built-in Windows-1252/Latin-1/ASCII and UTF-16 (BOM-aware) decoding, WHATWG/Go label folding (feat/charset-transcoding); multi-byte CJK still needs the hook
- GetPictures embedded cell images: WPS DISPIMG, modern rich-value Place-in-cell (_rvRel:LocalImageIdentifier), and IMAGE() web images via xl/richData/* + metadata.xml (feat/embedded-cell-pictures)
- SECURITY: encryption salts were fully deterministic (ChaCha8 fixed
default seed); now time-seeded per process +
set_random_sourcehook for crypto-grade entropy (feat/excelize-parity-round2). Built-in fallback is still not a CSPRNG. - RC4-style standard encryption verifier layout accepted (non-AES AlgID -> 20-byte verifier hash, decryption stays SHA-1 + AES-ECB exactly like Go) (feat/rc4-standard-layout)
- Chart
Fillsemantics:ChartFilloverride (typ/pattern/color/ shading/transparency) on all fill-bearing chart elements, faithful to drawShapeFill (feat/parity-round3) - LEFTB/RIGHTB/MIDB/REPLACEB unified on Excel DBCS byte semantics via a shared dbcs_byte_range helper, no more mojibake (feat/parity-round3)
-
culture_infonow resolves language builtin numFmt IDs 27-36/50-62/ 67-81 for en-US/ja-JP/ko-KR/zh-CN/zh-TW (feat/culture-num-fmt); era codes with [$-404]/[$-411] locale tokens still pass through raw - Hyperlinks with both
r:idandlocationnow keep the fragment (Hyperlink.location field), match both filters, and survive write roundtrips (fix/hyperlink-location-fidelity)
Fixed in this pass: get_hyperlink_cells, get_sheet_protection,
ChartAxis drop_lines/high_low_lines, public ChartLineType with Solid
scheme-color emission, public PivotTableField options + dataField
numFmtId/subtotal normalization/255-unit name truncation, NaN/Inf cell
values written as strings.
- Remove
moon checkwarnings + deprecated slice usage (commit4a75627) - Coverage: raise
zip/package coverage to ≥95% (now 705/738 ≈ 95.53%) - Coverage: raise
xlsx/package coverage materially (currently 25277/31302 ≈ 80.75%; 95–98% is a large effort) - Coverage: decide how to treat
cmd/mainfn main(currently un-coverable by tests) - Coverage: audit unreachable branches in
zip/+crypto/(some checks appear dead without whitebox access) - Package-by-package readability/perf pass (start with
zip/, thenooxml/, thencrypto/) - Target support: confirm
--target wasmcompatibility (currentlymoon check --target allfails due to missing@async/fs/@processAPIs in dependencies)
- Expand
xlsx.Stylebeyond number formats (Font/Fill/Border/Alignment/Protection parity with ExcelizeStyleinexcelize/xmlStyles.go)- Font (cell styles + conditional styles)
- Fill (pattern/solid + conditional fill)
- Border (basic left/right/top/bottom + conditional border)
- Alignment (basic + conditional alignment)
- Protection (locked/hidden + conditional protection)
- Add high-level chart builder types (partial parity with Excelize
Chart*types inexcelize/xmlChart.go/excelize/chart.go)
- Add picture
name/alt_textoptions (partial parity with ExcelizeGraphicOptionsinexcelize/xmlDrawing.go) - Add picture lock-aspect option (partial
GraphicOptionsparity) - Follow-up: picture positioning (oneCell/twoCell/absolute) (more
GraphicOptionsparity) - Follow-up: picture autofit options (AutoFit / AutoFitIgnoreAspect) (more
GraphicOptionsparity) - Follow-up: picture
PrintObject/Lockedflags (writesxdr:clientDataattrs) (moreGraphicOptionsparity) - Expand
xlsx.Shapeto support size/fill/line/rich text paragraphs (ExcelizeShape/ShapeLineinexcelize/xmlDrawing.go)- Size (width/height + scale) and basic rich-text paragraphs
- Solid fill (color + transparency) and line (color + width)
- Name/alt text +
xdr:clientDataflags - Positioning (oneCell/twoCell/absolute)
- Add
SparklineOptionsbasic parity (style presets, markers/high/low/first/last/negative, axis, reverse, seriesColor) and round-trip viaSparklineGroupOptions - Follow-ups: date axis, hidden, weight, manual min/max, empty cell modes (Excelize
SparklineOptionsinexcelize/xmlWorksheet.go)
- Add
PivotTableOptionsbuilder (ExcelizePivotTableOptionsinexcelize/pivotTable.go) - Add
SlicerOptionsbuilder (ExcelizeSlicerOptionsinexcelize/slicer.go)
- Add
FormulaOptsparity where meaningful (ExcelizeFormulaOptsinexcelize/cell.go) - Add
HyperlinkOpts-like API for richer hyperlinks (ExcelizeHyperlinkOptsinexcelize/cell.go)
- Add higher-level
ConditionalFormatOptionsparity (ExcelizeConditionalFormatOptionsinexcelize/xmlWorksheet.go) - Read x14 conditional formatting from worksheet
extLst(iconSet + dataBar advanced props) and expose viaget_conditional_formats - Write x14 data bar advanced props (direction/solid/border) with deterministic
<x14:id>linkage - Match Excelize
SetConditionalFormatrange normalization for reversed/row/col refs (A2:A1,B:B,2:2->A2:A1 B1:B1048576 A2:XFD2)
- Expand
xlsx.Tableoptions (row/col stripes, first/last column emphasis, etc.) (ExcelizeTableinexcelize/table.go/excelize/xmlTable.go)
- Expand
RichTextFonttoward ExcelizeFontparity (strike/shadow/vertAlign/etc.) - Audit/expand style long-tail options and add round-trip tests
- Style
Fontlong-tail tags (strike/outline/shadow/condense/extend/charset/family/scheme/vertAlign) - Style
BorderdiagonalUp/diagonalDown (+ optional vertical/horizontal) - Style
Filltransparency (ARGB alpha) + round-trip tests - Style theme/indexed colors + tint (Font/Fill)
- Style
- Audit/expand chart option coverage (typed model vs raw OOXML fallbacks)
- Support more basic chart types (stacked col/bar, area, pie, doughnut, radar, scatter, bubble)
- Emit axis titles/gridlines/numFmt/tickLblPos + dispBlanksAs + bar gapWidth/overlap
- Add stock chart support (high-low-close, open-high-low-close)
- Add 3D chart support (pie3D/line3D/area3D/col3D/bar3D/surface, etc.)
- Add deeper series styling options (fill/line/marker/data labels/data points)
- Doughnut chart
holeSizeoption - Bubble chart
bubbleScaleoption - Plot-area data label flags (showCatName/showSerName/showPercent/showLeaderLines/showBubbleSize)
- Axis font + alignment parity (ChartAxis)
- Title rich text parity (Chart title/axis title runs)
- Series fill/marker fill+border parity (ChartSeries/ChartMarker/ChartLine)
- Omit legend element when
legend.position == "none" - Legend font parity (
ChartLegend.font-><c:txPr>) - Plot-area fill parity (
ChartPlotArea.Fillsolid fill at least) - Plot-area data table parity (
ShowDataTable/ShowDataTableKeys) - Data label model parity (
ChartDataLabelalignment/font/fill) - Chart border/fill parity (chart-level
<c:spPr>/<c:txPr>) - OfPie split position (
ChartPlotArea.SecondPlotValues-><c:splitPos>)
- Rich text run color theme/indexed/tint (
RichTextFont.color_theme/color_indexed/color_tint)
- Shape macro attribute (
Shape.macro_name->xdr:cNvPr macro="...")
These are discovered via python3 scripts/excelize_struct_field_parity.py and manual review.
- Pivot table definition option attrs (grand totals/drill/autofmt/etc.) + rowItems/colItems parity (partial Excelize
PivotTableOptions) - Pivot field options parity (compact/outline/showAll/insertBlankRow/defaultSubtotal + proper
<items>)
- Sparkline per-color parity on
SparklineOptions(negative/markers/first/last/high/low colors) or unify viaSparklineGroupOptions
- Number format long-tail parity (Excelize
Style.DecimalPlaces,Style.NegRed,Style.CustomNumFmtvs MoonBitNumberFormat)
These are behavior/interop differences not well-captured by API-name parity or struct-field parity scripts.
- Parse image dimensions for more formats (bmp/tiff/ico) for correct EMU sizing
- Parse SVG dimensions (width/height/viewBox) for correct EMU sizing
- Parse metafile dimensions (emf/wmf) for correct EMU sizing
- Compressed metafiles (emz/wmz): gzip-decompress + sizing parity
- Formula function-name parity vs Excelize (
python3 scripts/excelize_formula_parity.py)
- Parse + round-trip basic form controls (macro/cellLink/checked) via
xl/drawings/vmlDrawing*.vml - FormControl sizing parity (width/height + anchor calculation)
- FormControl option parity (current/min/max/inc/page/horizontally, etc.)
- FormControl rich text paragraphs parity (
Paragraph-> VML<font>runs) - FormControl VML presets parity (fill/stroke + common
<x:ClientData>defaults)
These are larger-scope items where Excelize exposes many knobs and mbtexcel may still be a subset. Tackle one item at a time and add focused tests.
- Two-cell/absolute anchors compute correct
<xdr:to>cell (not same-cell with huge offsets) for charts/images/shapes (Excelize usestwoCellAnchorfor charts by default)
- Chart options long-tail parity audit (Excelize
Chart/Chart*options vs mbtexcel chart model) - Combo charts (basic CatAx/ValAx + optional secondary Y axis) (Excelize
AddChart(..., combo ...*Chart)/AddChartSheet(..., combo ...*Chart)) - Combo charts (axis-model long-tail): scatter/bubble mixes (basic)
- Combo charts (axis-model long-tail): dateAx/stock mixes and other edge cases
- Style model long-tail parity audit (rare font/fill/border/alignment/protection tags and edge cases)
- Gradient cell fills (
Fill::gradient,Fill.typ == "gradient",Fill.shading0..16) - Gradient conditional fills (dxfs
<dxf><fill><gradientFill .../></fill></dxf>) - Round-trip theme/indexed colors (
xl/theme/theme1.xml,xl/styles.xml<indexedColors>) - Round-trip
<colors><mruColors>(read + write preserve) - Preserve full theme XML on write (round-trip
xl/theme/theme1.xmlbeyond just extracted colors) - Round-trip
<styleSheet><extLst>(read + write preserve) - Round-trip
<tableStyles>default styles (defaultTableStyle/defaultPivotStyle attrs)
- Gradient cell fills (