API#6
Merged
Merged
Conversation
Adds getRange / setRangeValues / setRangeFormulas / clearRange across Rust, WASM, and TS. A1 range parser handles sheet-qualified, absolute, single-cell, and reversed-corner references. Shape validation surfaces as a new shape_mismatch ApiError. New RangeInfo DTO carries canonical bounds plus row-major values and formulas matrices.
Adds insert_rows/delete_rows/insert_columns/delete_columns on Workbook (Rust + WASM + TS). Shifts cell A1 refs, row indices, <col> metadata, merges (collapsing single-cell remnants), and formula references across all sheets (cross-sheet, absolute markers, ranges, column-only/row-only). Deleted refs collapse to #REF!. Defined names, tables, and CF refs are preserved but not yet shifted.
…n row/col insert/delete
Open .xlsx (or start blank) -> mutate via a small JS editor with snippet presets -> recalc -> re-render through createWorkbookPreviewer -> save back as .xlsx. Wired into the site build at /playground and listed on the landing page. Closes the P0 'Browser harness' row in docs/parity-api.md.
search(query, options): substring/exact/wildcard/regex over values, formulas, or both; optional sheet+range scope, case sensitivity, and max-result cap. Defaults (values, substring, case-insensitive) match hsx. New SearchOptions/SearchMatch DTOs and invalid_search_query ApiError. Wired through Rust, WASM, and TS.
set_hyperlink / remove_hyperlink / hyperlinks(sheet) with HyperlinkInfo + HyperlinkPatch DTOs. Targets dedupe to existing worksheet relationships; overlapping hyperlinks on set are replaced; orphan hyperlink rIds are removed from sheetN.xml.rels. New invalid_hyperlink ApiError. Wired through WASM + TS wrapper. Test verifies round-trip + rels cleanup.
Add properties()/setProperties() for core file properties (title, subject, creator, keywords, description, lastModifiedBy, category, contentStatus, identifier, language, revision, version, created, modified, lastPrinted) and calcProperties()/setCalcProperties() with CalcMode enum across xlcore-types, xlcore-api, xlcore-wasm, and the TS Workbook wrapper. Lazily creates docProps/core.xml on first write with cp/dc/dcterms/xsi namespaces; round-trips through save/reopen. Adds invalid_property ApiError for malformed ISO timestamps. Smoke + Rust tests cover patch, preservation of unchanged fields, and round-trip.
- comments(sheet)/setComment/removeComment with CommentInfo+CommentPatch DTOs, lazy commentsN.xml part, author upsert, invalid_comment error - dependencies(ref)/precedents/dependents with DependencyInfo+DependencyReference DTOs via ironcalc parser - TS + WASM bindings, schema regen, smoke-api coverage
autoFilter(sheet) / setAutoFilter(ref) / removeAutoFilter(sheet) with AutoFilterInfo DTO. Writes the worksheet-level <autoFilter ref> range; clears filter columns and sort state on overwrite. Filter criteria authoring deferred.
Author Excel tables via Workbook.tables / setTable / removeTable. Upsert by workbook-unique name, create xl/tables/tableN.xml + <tableParts> linkage, infer column names from the header row (with duplicate suffixing), support resize, header/totals row counts, per-column totals function/label/formula, calculated column formulas, and tableStyleInfo. New invalid_table ApiError. Blank workbook worksheets now declare xmlns:r so generated tables/hyperlinks parse in strict consumers.
Adds sheetProtection / setSheetProtection / removeSheetProtection and workbookProtection / setWorkbookProtection / removeWorkbookProtection on Workbook (Rust + WASM + TS). SheetProtectionInfo/Patch and WorkbookProtectionInfo/Patch DTOs cover all lock flags, legacy hex passwords, and modern algorithmName/hashValue/saltValue/spinCount. Round-trips through save/reopen via <sheetProtection> and <workbookProtection>. New invalid_protection ApiError for non-hex passwords and empty credential fields. Marks Protection done in docs/parity-api.md.
…nly Values) Adds set_auto_filter_column / remove_auto_filter_column with AutoFilterColumnInfo + AutoFilterColumnPatch + AutoFilterCriteria (values | top10 | custom | unsupported) + AutoFilterCustomCriterion + AutoFilterOperator DTOs. AutoFilterInfo gains a columns list. Top10 and Custom (<=2 criteria, AND/OR) round-trip; multi-value Values authoring is blocked on an ooxmlsdk 0.6.1 choice-particle bug (Filters.filters_choice is Option<Choice> instead of Vec<Choice>) and the reader falls back through x14:CustomFilters because the SDK routes the default spreadsheetml namespace to the x14 arm first. Both issues are fixed upstream in 0.7.0 -- queued as its own migration pass in docs/parity-api.md. New invalid_auto_filter ApiError for out-of-range column offsets, missing filter range, and empty/unsupported criteria.
Breaking schema rename pass across xlcore-io, xlcore-export, xlcore-bridge, xlcore-api, xlcore-tabular. Drop X/Xdr/C/Cx/A and x_/xdr_/c_/cx_/a_ prefixes. Font and RunProperties now choice particles - add xlcore-export/font_flat.rs helper. BooleanValue is now an enum; convert via bool::from / from_bool. CoordinateValue/Coordinate32Value/DrawingmlPercentageValue/TextBulletSizeValue are wrapper enums; convert via to_emu()/as_drawingml_percent(). Text/CellValue/ Author/Formula/TotalsRowFormula etc. are tuple structs wrapping XstringType or TableFormulaType. sequence_of_references is plain Vec<String>. GraphicData exposes graphic_data_choice; chart-frame relationship lookup walks GraphicDataChoice::ChartReference. feat(xlcore-api): multi-value AutoFilter Values criteria Lift the blank-only restriction now that 0.7.0 models <filters><filter/>... as Vec<FiltersChoice>. Emit one <x:filter/> per value, validate non-empty entries. Add multi-value round-trip regression test.
…xample cell setters
…mula parens on commit
Workaround ooxmlsdk 0.7.0 omitting Default Extension="rels"/"xml" in [Content_Types].xml for created packages, which made Excel repair files on open. Also emit <font> children in CT_Font schema order.
Minimal ooxmlsdk vs DocumentFormat.OpenXml repro showing created packages omit Default Extension="rels"/"xml", plus source-of-truth analysis (System.IO.Packaging ContentTypeHelper) and the faulty ooxmlsdk locations.
Add Error(String) to EngineCellValue; is_genuine_error splits genuine Excel errors from engine limitations; genuine errors produce value=Error(kind) with no fallback and are written as t="e" v=kind in XML; t="e" cells harvested as Error not String; TS schema regenerated.
# Conflicts: # crates/xlcore-export/src/sheet.rs # packages/xlsx-preview/CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.