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 some lookup formulas #3352

Merged
merged 7 commits into from
Sep 9, 2024
Merged

Conversation

wpxp123456
Copy link
Contributor

close https://github.com/dream-num/univer-pro/issues/2364

Pull Request Checklist

  • Related tickets or issues have been linked in the PR description (or missing issue).
  • Naming convention is followed (do please check it especially when you created new plugins, commands and resources).
  • Unit tests have been added for the changes (if applicable).
  • Breaking changes have been documented (or no breaking changes introduced in this PR).

@wpxp123456 wpxp123456 added the qa:untested This PR is ready to be tested label Sep 6, 2024
Copy link

github-actions bot commented Sep 6, 2024

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

Copy link

codecov bot commented Sep 6, 2024

Codecov Report

Attention: Patch coverage is 99.15966% with 4 lines in your changes missing coverage. Please review.

Project coverage is 30.51%. Comparing base (56a27a7) to head (b29574d).
Report is 3 commits behind head on dev.

Files with missing lines Patch % Lines
...engine-formula/src/functions/lookup/tocol/index.ts 97.40% 2 Missing ⚠️
...engine-formula/src/functions/lookup/torow/index.ts 97.36% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #3352      +/-   ##
==========================================
+ Coverage   30.20%   30.51%   +0.30%     
==========================================
  Files        2109     2117       +8     
  Lines      110029   110527     +498     
  Branches    23922    24126     +204     
==========================================
+ Hits        33233    33723     +490     
- Misses      76796    76804       +8     

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

@zhaolixin7
Copy link

zhaolixin7 commented Sep 7, 2024

@wpxp123456 drop1、删除引用值预期报#ref
image
2024_9_7 14_59_17 commands.json
2024_9_7 14_59_17 video.webm
2、参数错误时预取报#n/a或#value
image
3、参数为空时无报错
image

@univer-bot
Copy link

univer-bot bot commented Sep 7, 2024

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

@wpxp123456 drop1, delete reference value expected report #ref
image
2024_9_7 14_59_17 commands.json
2024_9_7 14_59_17 video.webm
2. When the parameter is wrong, the prefetch report #n/a or #value
image
3. No error is reported when the parameter is empty
image

@zhaolixin7
Copy link

zhaolixin7 commented Sep 7, 2024

EXPAND1、参数为空时无报错
image
2、无效时错误码是#name(=EXPAND(D23:D25, true, false, 0) )
image
如:
image
3、引用选区时预期报#na(=EXPAND(A9:A11,B5:B8,A5:A7) )
image
image

@univer-bot
Copy link

univer-bot bot commented Sep 7, 2024

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

EXPAND1, no error is reported when the parameter is empty
image
2. When invalid, the error code is #name(=EXPAND(D23:D25, true, false, 0) )
image
like:
image
3. When quoting a selection, it is expected to report #na(=EXPAND(A9:A11,B5:B8,A5:A7) )
image
image

@zhaolixin7
Copy link

zhaolixin7 commented Sep 9, 2024

take:1、参数为-1时公式显示为空,预期报错,
image
image
2、引用选区时公式结果计算错误(=TAKE(,A3:A4,B2:B5))
image
image

@univer-bot
Copy link

univer-bot bot commented Sep 9, 2024

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

take:1. When the parameter is -1, the formula is displayed as empty, and an error is expected.
image
image
2. The formula result is calculated incorrectly when referencing a selection (=TAKE(,A3:A4,B2:B5))
image
image

@dream-num dream-num deleted a comment from univer-bot bot Sep 9, 2024
@zhaolixin7
Copy link

zhaolixin7 commented Sep 9, 2024

tocol:1、引用选区时(=TOCOL(,B4:B8,A7:A10))预期显示#value,表现:显示#n/a
image
image
2、引用选区时公式计算结果错误=TOCOL((A1:A6,C1:F1,G3:G6),1)2024_9_9 15_41_50 snapshot.json
image
image

@univer-bot
Copy link

univer-bot bot commented Sep 9, 2024

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

tocol: 1. When referencing a selection (=TOCOL(,B4:B8,A7:A10)), #value is expected to be displayed. Performance: #n/a is displayed.
image
image
2. The formula calculation result is wrong when referencing the selection =TOCOL((A1:A6,C1:F1,G3:G6),1)[2024_9_9 15_41_50 snapshot.json](https://github.com/user-attachments/files/ 16927125/2024_9_9.15_41_50.snapshot.json)
image
image

@zhaolixin7
Copy link

torow:引用选区计算不出结果=TOROW((A1:A6, C1:F1, G3:G6), 1)
2024_9_9 16_03_39 snapshot.json
image

@univer-bot
Copy link

univer-bot bot commented Sep 9, 2024

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

torow: No result can be calculated by referencing the selection =TOROW((A1:A6, C1:F1, G3:G6), 1)
2024_9_9 16_03_39 snapshot.json
image

@zhaolixin7
Copy link

zhaolixin7 commented Sep 9, 2024

WRAPCOLS:1、引用选区、空时计算不出结果=WRAPCOLS(B1:B15,H11:I13)
image
image

@univer-bot
Copy link

univer-bot bot commented Sep 9, 2024

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

WRAPCOLS: 1. When referencing the selection, the result cannot be calculated when it is empty =WRAPCOLS(B1:B15,H11:I13)
image
image

@wpxp123456 wpxp123456 force-pushed the feat/add-lookup-functions branch from 58daf97 to 4f29b9d Compare September 9, 2024 08:26
@zhaolixin7
Copy link

zhaolixin7 commented Sep 9, 2024

WRAPCOLS/ WRAPROWS:选区显示不出结果(=WRAPCOLS((A1:A6, C1:F1, G3:G6), 3))image
image

@univer-bot
Copy link

univer-bot bot commented Sep 9, 2024

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

WRAPCOLS/ WRAPROWS: No results are displayed in the selection (=WRAPCOLS((A1:A6, C1:F1, G3:G6), 3))![image](https://github.com/user-attachments/assets/22b50b6c -f2f8-4bfe-96f2-e3d4e5ed6398)
image

@zhaolixin7 zhaolixin7 added the qa:verified This PR has already by verified by a QA and is considered good enough to be merge label Sep 9, 2024
@univer-bot univer-bot bot removed the qa:untested This PR is ready to be tested label Sep 9, 2024
@wpxp123456 wpxp123456 merged commit 5ab9c7d into dev Sep 9, 2024
9 checks passed
@wpxp123456 wpxp123456 deleted the feat/add-lookup-functions branch September 9, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa:verified This PR has already by verified by a QA and is considered good enough to be merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants