Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(formula): add functions, fix function calculation error #1395

Merged
merged 14 commits into from
Mar 4, 2024

Conversation

Dushusir
Copy link
Member

@Dushusir Dushusir commented Feb 20, 2024

  • I am sure that the code is update-to-date with the dev branch.

close #

Add some functions

  • ROW
  • ROWS
  • COLUMN
  • COLUMNS
  • SUBTOTAL
  • INDEX (Array mode)
  • MOD
  • POWER(supports =5^2)
  • ISERR
  • ISERROR
  • ISLOGICAL
  • ISNA
  • ISNONTEXT
  • ISNUMBER
  • ISREF
  • ISTEXT

Fix some issues

  • add INDIRECT/YEAR/DAY/MONTH description, other descriptions
  • =SUM("1") gets 1, not #VALUE
  • =DAY("7/20/1969") gets error,not value
  • DAY/MONTH/YEAR/EDATE refers to blank cell, needs to calculate the value, not error.
  • fix =HLOOKUP(A3,A1:D4,44444444) gets #REF!, not #VALUE!

Copy link

github-actions bot commented Feb 20, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

@Dushusir Dushusir changed the title feat(formula): add row function feat(formula): add functions Feb 20, 2024
@Dushusir Dushusir changed the title feat(formula): add functions feat(formula): add functions, fix function calculation error Feb 20, 2024
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 84 lines in your changes are missing coverage. Please review.

Project coverage is 32.59%. Comparing base (1d6e257) to head (e9f1286).

Files Patch % Lines
...engine-formula/src/functions/lookup/index/index.ts 82.10% 17 Missing ⚠️
...ngine-formula/src/functions/math/subtotal/index.ts 94.39% 13 Missing ⚠️
...ormula/src/engine/value-object/primitive-object.ts 89.28% 3 Missing ⚠️
...e-formula/src/functions/information/iserr/index.ts 80.00% 3 Missing ⚠️
...ges/engine-formula/src/functions/math/mod/index.ts 62.50% 3 Missing ⚠️
...s/engine-formula/src/functions/math/power/index.ts 62.50% 3 Missing ⚠️
...c/engine/reference-object/base-reference-object.ts 50.00% 2 Missing ⚠️
...mula/src/engine/value-object/array-value-object.ts 91.66% 2 Missing ⚠️
...rmula/src/engine/value-object/base-value-object.ts 50.00% 2 Missing ⚠️
...formula/src/functions/information/iserror/index.ts 81.81% 2 Missing ⚠️
... and 26 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1395      +/-   ##
==========================================
+ Coverage   31.50%   32.59%   +1.08%     
==========================================
  Files         880      905      +25     
  Lines       49378    50121     +743     
  Branches    10192    10431     +239     
==========================================
+ Hits        15559    16335     +776     
+ Misses      33819    33786      -33     

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

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (a6e17ef) 31.48% compared to head (bdd251c) 31.54%.

Files Patch % Lines
...ges/engine-formula/src/functions/date/day/index.ts 93.75% 1 Missing ⚠️
...s/engine-formula/src/functions/date/month/index.ts 93.75% 1 Missing ⚠️
...es/engine-formula/src/functions/date/year/index.ts 94.44% 1 Missing ⚠️
...ngine-formula/src/functions/lookup/column/index.ts 93.75% 1 Missing ⚠️
...s/engine-formula/src/functions/lookup/row/index.ts 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1395      +/-   ##
==========================================
+ Coverage   31.48%   31.54%   +0.05%     
==========================================
  Files         858      860       +2     
  Lines       48628    48660      +32     
  Branches    10050    10057       +7     
==========================================
+ Hits        15312    15349      +37     
+ Misses      33316    33311       -5     

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

@Dushusir Dushusir force-pushed the dushusir/formula-demo branch 4 times, most recently from 8c94ee1 to 20c9922 Compare February 23, 2024 09:34
@Dushusir
Copy link
Member Author

17086851973556
86852089016
无效引用我们是报#value

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


17086851973556
86852089016
Invalid references are reported as #value

@Dushusir Dushusir force-pushed the dushusir/formula-demo branch 4 times, most recently from 81b89f4 to 8e3cc7b Compare February 28, 2024 03:03
@Dushusir Dushusir force-pushed the dushusir/formula-demo branch 2 times, most recently from 019924f to ced4e30 Compare March 4, 2024 02:53
@Dushusir Dushusir marked this pull request as ready for review March 4, 2024 12:28
@Dushusir Dushusir added the qa:untested This PR is ready to be tested label Mar 4, 2024
@Dushusir Dushusir removed the qa:untested This PR is ready to be tested label Mar 4, 2024
@Dushusir Dushusir merged commit 885ba4b into dev Mar 4, 2024
7 checks passed
@Dushusir Dushusir deleted the dushusir/formula-demo branch March 4, 2024 12:47
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.

3 participants