v1.2.0
Feature release. The formula library grows from 32 to 109 built-in functions, the cell editor gains Excel-style color-coded formula reference editing with click-to-insert, the selection now has a drag-fill handle, and conditional format rules can override borders per side. React and Vue wrappers expose worksheet events as component props. No breaking public-API changes.
✨ Highlights
- ▸ Auto-fill (drag fill handle). A small square at the bottom-right of the selection drags to extend values down / up / left / right. Single-cell drags tile-copy; two or more numeric cells extrapolate as an arithmetic progression (
1, 2→3, 4, 5); a single date-formatted cell increments by one day; formulas shift their relative references the way Excel does ($-anchored cells preserved). Styles, number formats, and cell types propagate. Undo restores prior values. - ▸ Excel-style formula reference editing. While editing a formula (cell starting with
=), clicking another cell inserts that cell's address at the caret; drag extends it into a range. Each unique reference is colored from a shared palette, and the grid draws a matching dashed rectangle around each referenced range. Highlight rectangles expand to enclose merged regions. - ▸ Enter starts cell editing. Mac-friendly default — Enter now begins edit mode (caret at end), matching Numbers and Excel for Mac. F2 still works.
- ▸ 109 built-in formula functions (up from 32). New:
VLOOKUP/HLOOKUP/INDEX/MATCH/XLOOKUP/XMATCH/ADDRESS;SUMIFS/COUNTIFS/AVERAGEIFS/MAXIFS/MINIFS/SWITCH; dateTODAY/NOW/DATE/YEAR/MONTH/DAY/HOUR/MINUTE/SECOND/WEEKDAY/EDATE/EOMONTH/DAYS/DATEDIF; mathSUMPRODUCT/CEILING/FLOOR/MROUND/MEDIAN/LARGE/SMALL/RANK/EXP/LN/LOG/LOG10/SIGN/PI/RAND/RANDBETWEEN; trigSIN/COS/TAN/ASIN/ACOS/ATAN/ATAN2; textSEARCH/EXACT/PROPER/CHAR/CODE; infoROW/COLUMN/ROWS/COLUMNS. - ▸ Per-side border overrides in conditional formatting. CF rules can carry a
borderpayload that paints right / top / bottom / left edges on matching cells, overriding manual borders per side. Read / written through the xlsx<dxf><border>round-trip. - ▸ React / Vue worksheet events as component props. Both wrappers now expose idiomatic event props for selection, cell value, bulk cell, scroll, viewport size, and structure changes. No more imperative
worksheet.on*()subscriptions for the common cases. - ▸
reogrid-jsonI/O from the package main entry. Hosts persisting worksheets (e.g. ReoGrid Studio) no longer need to reach into deep paths —writeReoGridJson/readReoGridJson/parseReoGridJsonandReoGridJsonDocument/JsonWorksheet/JsonCelltypes are re-exported from both@reogrid/liteand@reogrid/pro.
+ Added
- ▸
ReogridOptions.autoFill(defaulttrue) andWorksheet.setAutoFillEnabled()to toggle the fill handle. - ▸
AutoFillActionandcomputeAutoFillValues()exposed for programmatic auto-fill. - ▸
Worksheet.setFormulaRefHighlights()/CanvasWorksheet.setFormulaRefHighlights()and aTHEME.formulaRefColorspalette shared between editor and grid renderer. - ▸ Conditional format
borderpayload (right/top/bottom/left, each with style + color), evaluated end-to-end through the engine, renderer, and xlsx writer. - ▸ React component event props:
onSelectionChange,onCellValueChange,onBulkCellValueChange,onScroll,onViewportSizeChange,onStructureChange(in addition toonReady). - ▸ Vue component emits the same set of events with typed payloads.
- ▸
@reogrid/liteand@reogrid/promain entries now re-exportwriteReoGridJson,readReoGridJson,parseReoGridJson, plus theReoGridJsonDocument/JsonWorksheet/JsonCelldocument types and theReoGridJsonReadOptions/ReoGridJsonWriteOptionsoption types. - ▸ Formula function reference doc covering all 109 built-ins across 10 categories.
~ Changed
- ▸ Formula reference highlight in the editor expands to enclose merged regions when a referenced cell or range overlaps a merge — matches Excel rather than Google Sheets.
🐛 Fixed
- ▸ Auto-fill hover cursor is now applied on the scroll container as well, so the cross-hair cursor appears reliably across the entire fill-handle hit area.
- ▸ Render-cache key no longer contains an embedded NUL byte; it is replaced with
|, avoiding rare measurement-cache collisions and string-handling oddities.
⚡ Performance
- ▸ Per-frame canvas state cache cuts redundant API calls on Book1.xlsx scroll:
ctx.font=129 → 34 (-74%),ctx.fillStyle=179 → 46 (-74%),ctx.measureText()126 → 35 (-72%),save()/restore()122 → 85 (-30%). In real browsers, wherectx.fontparsing andmeasureTextshaping dominate per-cell cost, this translates directly to smoother scrolling on large sheets. - ▸
layoutPlainTextLines()output is cached per frame for wrapped / multi-line cells. Text-heavy sheets with wrap-text see a large reduction in per-frame work during scroll. Single-line unwrapped text takes a fast path that bypasses the cache.