dream-num / univer

Univer is an open-source alternative to Google Sheets, Slides, and Docs

Home Page:https://univer.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug] The result displayed by the custom formula is #SPILL

guinanlin opened this issue · comments

commented

在您提交此问题之前,您是否检查了以下内容?

  • 这真的是个问题吗?
  • 我已经在 Github Issues 中搜索过了,但没有找到类似的问题。

受影响的包和版本

0.1.14

复现链接

  1. 定义了一个自定义的函数:
async function asyncArrayFunction(value: BaseValueObject) {
  return new Promise((resolve: (value: ArrayValueObject) => void) => {
          getFrappeDbAll({ doctype: value.getValue(),fields1: "['valuation_method','item_code']" })  // 调用API获取所有文档
          .then(res => {
            console.info("原始数据:",res);
            return res.message.data.records;
          })
          .then(result => transformData(result))
          .then(data => {
              console.log("转换后的数据", data);
              resolve(ArrayValueObject.createByArray(data));
          })
          .catch(error => {
              console.error('Error fetching or transforming data:', error);
              throw error;  // Rethrow error to propagate it
          });
  });
}

2, 转换出来的data的格式在这里: https://gist.githubusercontent.com/guinanlin/c782a7cafaeb5d7f76693faa9dd0eefb/raw/405cce530ea2f750dac81714c3790e0542fdb277/custom-function-array
进行 resolve(ArrayValueObject.createByArray(data)); 的时候会报 #SPILL

3, 我已经尝试做了如下的检测:

  1. 对字段里头的 null,空列, 特殊字段定义 做了 特别测试, 这些显示都没有问题.
  2. 如果只是取其中的2列, 3列 也都是好的.
    是什么场景导致会取不了的呢?

预期行为

需要能正常返回数据

实际行为

返回了 #SPILL
image

运行环境

Chrome

系统信息

No response

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

Origin Title: [Bug] 自定义公式展示的结果为#SPILL

Title: [Bug] The result displayed by the custom formula is #SPILL


Before you submitted this question, did you check the following?

  • Is this really a problem?
  • I've searched Github Issues but haven't found any similar issues.

Affected packages and versions

0.1.14

Recurrence link

  1. Define a custom function:
async function asyncArrayFunction(value: BaseValueObject) {
  return new Promise((resolve: (value: ArrayValueObject) => void) => {
          getFrappeDbAll({ doctype: value.getValue(),fields1: "['valuation_method','item_code']" }) // Call the API to get all documents
          .then(res => {
            console.info("Original data:",res);
            return res.message.data.records;
          })
          .then(result => transformData(result))
          .then(data => {
              console.log("Converted data", data);
              resolve(ArrayValueObject.createByArray(data));
          })
          .catch(error => {
              console.error('Error fetching or transforming data:', error);
              throw error; // Rethrow error to propagate it
          });
  });
}
  1. The format of the converted data is here: https://gist.githubusercontent.com/guinanlin/c782a7cafaeb5d7f76693faa9dd0eefb/raw/405cce530ea2f750dac81714c3790e0542fdb277/custom-function-array
    #SPILL will be reported when executing resolve(ArrayValueObject.createByArray(data));

  2. I have tried the following tests:

  1. We have done special tests on null, empty columns, and special field definitions in the fields, and there are no problems with these displays.
  2. If you only take 2 columns, all 3 columns are also good.
    What is the scenario that prevents it from being retrieved?

Expected behavior

Need to be able to return data normally

Actual behavior

Returned #SPILL
image

Running environment

Chrome

system message

No response

一个单元格赋值为数组公式,要求赋值范围内必须都是空单元格才能正常展示。也就是说你的表格赋值的公式右下侧,必须有63行,70列的剩余空白单元格空间才能完整展示这么多数据

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

When a cell is assigned an array formula, all cells in the assignment range must be empty for normal display. In other words, there must be 63 rows and 70 columns of remaining blank cell space on the lower right side of the formula assigned to your table to fully display so much data.

有任何问题请再反馈,或者重开issue

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

If you have any questions, please feedback or reopen the issue