Skip to content

feat(formulas): create new Formula Editor plugin - #2716

Draft
ghiscoding wants to merge 7 commits into
masterfrom
feat/cell-formula-plugin
Draft

feat(formulas): create new Formula Editor plugin#2716
ghiscoding wants to merge 7 commits into
masterfrom
feat/cell-formula-plugin

Conversation

@ghiscoding

@ghiscoding ghiscoding commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Similar implement to Ag-Grid Formulas which is basically to be able use Excel spreadsheet formulas in any grids. This will be an opt-in plugin (external resource) and after installation the user will simply need to add allowFormula to whichever column definition

msedge_oH3hNkSCew

TODOs

  • working POC
  • export to Excel with formulas
  • full unit tests coverage
  • Cypress E2E tests
  • better showing of formula cell selected and cell range selected
  • support Custom Functions
    • note: implemented already but on the export side, it is only supported by latest Office 365 via (Lambda functions)
  • function intellisense isn't working in the middle of the formula
    • formula cell selection are being inversed when adding a sum in the middle of the formula
      • when fixed, we need Cypress tests to avoid future regression
    • dark theme has multiple unused SASS variables that we might need
  • should we use textarea instead of input for the cell formula editor
    • I think we should simply make the editor as 100% width like any typical editor
  • What should we do when offset introduced?
    • not currently working with Grouping
    • issues with Column Reorder and/or Hiding a column
    • it could work with REF(COLUMN("price"),ROW("1")) but that is a lot to type instead of C1, perhaps we could do mapping behind the scene and update the mapping when offset is introduced (e.g. column reorder, grouping)?
    • and actually Ag-Grid stores all formulas with ref/row as per their docs:
Stored formulas:
Key: a_01-total, Formula: =REF(COLUMN("price"),ROW("a_01"))*REF(COLUMN("quantity"),ROW("a_01"))
Key: o_02-total, Formula: =REF(COLUMN("price"),ROW("o_02"))*REF(COLUMN("quantity"),ROW("o_02"))
  • does a formula ref (e.g. REF(COLUMN("price"),ROW("1"))) actually works with Excel export?
  • can we have more highlighted styling for the selected cell(s) that we choose from the formula editor (perhaps double bg opacity), we currently only see the caret on bottom right corner
  • what about Grid State/Preset?
  • current range selection in Hybrid Selection model only works if we expand the drag further down, but it doesn't work correctly when decreasing the range or going up (need fixes in the hybrid selection model)
  • dragging a formula cell should replicate formula to cell targets (same as Excel) using cell selection "drag-fill" feature
  • wonder if we should also include the calculated columns which is Excel formulas but at the column level (e.g. calculatedExpression: '[revenue] - [cost]' where [revenue] is the column id in square bracket)

@ghiscoding
ghiscoding marked this pull request as draft August 8, 2026 20:48
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 78.15965% with 394 lines in your changes missing coverage. Please review.
✅ Project coverage is 98.6%. Comparing base (5cd515b) to head (becff96).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
packages/formula-plugin/src/formula.service.ts 75.5% 176 Missing and 30 partials ⚠️
packages/formula-plugin/src/formula.cellEditor.ts 76.8% 140 Missing and 26 partials ⚠️
packages/excel-export/src/excelExport.service.ts 73.5% 20 Missing and 2 partials ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master   #2716     +/-   ##
========================================
- Coverage   100.0%   98.6%   -1.4%     
========================================
  Files         200     204      +4     
  Lines       25542   27337   +1795     
  Branches     9030    9469    +439     
========================================
+ Hits        25542   26943   +1401     
- Misses          0     336    +336     
- Partials        0      58     +58     
Flag Coverage Δ
angular 100.0% <ø> (ø)
universal 98.6% <78.2%> (-1.4%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new

pkg-pr-new Bot commented Aug 8, 2026

Copy link
Copy Markdown
angular-slickgrid

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/angular-slickgrid@2716

aurelia-slickgrid

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/aurelia-slickgrid@2716

slickgrid-react

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/slickgrid-react@2716

slickgrid-vue

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/slickgrid-vue@2716

@slickgrid-universal/angular-row-detail-plugin

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/angular-row-detail-plugin@2716

@slickgrid-universal/aurelia-row-detail-plugin

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/aurelia-row-detail-plugin@2716

@slickgrid-universal/react-row-detail-plugin

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/react-row-detail-plugin@2716

@slickgrid-universal/vue-row-detail-plugin

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/vue-row-detail-plugin@2716

@slickgrid-universal/binding

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/binding@2716

@slickgrid-universal/common

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/common@2716

@slickgrid-universal/composite-editor-component

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/composite-editor-component@2716

@slickgrid-universal/custom-footer-component

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/custom-footer-component@2716

@slickgrid-universal/custom-tooltip-plugin

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/custom-tooltip-plugin@2716

@slickgrid-universal/empty-warning-component

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/empty-warning-component@2716

@slickgrid-universal/event-pub-sub

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/event-pub-sub@2716

@slickgrid-universal/excel-export

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/excel-export@2716

@slickgrid-universal/formula-plugin

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/formula-plugin@2716

@slickgrid-universal/graphql

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/graphql@2716

@slickgrid-universal/odata

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/odata@2716

@slickgrid-universal/pagination-component

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/pagination-component@2716

@slickgrid-universal/pdf-export

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/pdf-export@2716

@slickgrid-universal/row-detail-view-plugin

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/row-detail-view-plugin@2716

@slickgrid-universal/rxjs-observable

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/rxjs-observable@2716

@slickgrid-universal/sql

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/sql@2716

@slickgrid-universal/text-export

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/text-export@2716

@slickgrid-universal/utils

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/utils@2716

@slickgrid-universal/vanilla-bundle

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/vanilla-bundle@2716

@slickgrid-universal/vanilla-force-bundle

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/vanilla-force-bundle@2716

@slickgrid-universal/web-mcp

npm i https://pkg.pr.new/ghiscoding/slickgrid-universal/@slickgrid-universal/web-mcp@2716

commit: becff96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant