univer icon indicating copy to clipboard operation
univer copied to clipboard

feat(facade): get formulas by range

Open Dushusir opened this issue 10 months ago • 3 comments

close #2090 docs https://github.com/dream-num/univer.ai/pull/128

如何测试?

  1. 打开sheet
  2. 新建工作表
  3. A1输入=B1
  4. 将A1向下下拉填充3个单元格
  5. 打开浏览器控制台,打开 uniscript 面板
  6. uniscript 面板输入
const activeWorkbook = univerAPI.getActiveWorkbook();
const activeSheet = activeWorkbook.getActiveSheet();
const range = activeSheet.getRange(0, 0, 5, 1);
console.log(range.getFormulas());

执行脚本 7. 控制台打印

[['=B1'],['=B2'],['=B3'],['=B4'],['']]

Dushusir avatar Apr 29 '24 08:04 Dushusir

Codecov Report

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

Project coverage is 31.06%. Comparing base (5c6a417) to head (4486c13).

Files Patch % Lines
...es/engine-formula/src/models/formula-data.model.ts 63.15% 7 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2119      +/-   ##
==========================================
+ Coverage   31.03%   31.06%   +0.02%     
==========================================
  Files        1209     1209              
  Lines       66254    66285      +31     
  Branches    14019    14027       +8     
==========================================
+ Hits        20563    20589      +26     
- Misses      45691    45696       +5     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 29 '24 08:04 codecov[bot]

View Deployment

📑 Examples 📚 Storybook
🔗 Preview link 🔗 Preview link

github-actions[bot] avatar Apr 29 '24 08:04 github-actions[bot]

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

Origin Title: feat(facade): get formulas by range

Title: feat(facade): get formulas by range


close #2090 docs https://github.com/dream-num/univer.ai/pull/128

How to test?

  1. Open the sheet
  2. Create a new worksheet
  3. A1 input = B1
  4. Pull A1 down to fill 3 cells
  5. Open the browser console and open the uniscript panel
  6. uniscript panel input
const activeWorkbook = univerAPI.getActiveWorkbook();
const activeSheet = activeWorkbook.getActiveSheet();
const range = activeSheet.getRange(0, 0, 5, 1);
console.log(range.getFormulas());

Execute script 7. Console printing

[['=B1'],['=B2'],['=B3'],['=B4'],['']]

univer-bot[bot] avatar Apr 29 '24 08:04 univer-bot[bot]