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

[Bug]公式引用值是字符串计算结果错误 #1390

Closed
2 tasks done
zhaolixin7 opened this issue Feb 20, 2024 · 3 comments · Fixed by #1581
Closed
2 tasks done

[Bug]公式引用值是字符串计算结果错误 #1390

zhaolixin7 opened this issue Feb 20, 2024 · 3 comments · Fixed by #1581
Assignees
Labels
bug Something isn't working scope:formula

Comments

@zhaolixin7
Copy link

zhaolixin7 commented Feb 20, 2024

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

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

受影响的包和版本

dev

复现链接

1、公式=day("7/20/1969")
2、公式=sum("1") 、=ACOS("1")

预期行为

1、Excel、google会报#value
2、Excel可以计算出结果
image

实际行为

1、结果显示为空
2、报#value
image
image

运行环境

No response

系统信息

No response

@zhaolixin7 zhaolixin7 added the bug Something isn't working label Feb 20, 2024
@Issues-translate-bot
Copy link

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


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

dev

Recurrence link

  1. Formula =day("7/20/1969")
  2. Formula =sum("1")

Expected behavior

  1. Excel and Google will report #value
  2. Excel can calculate the results
    image

Actual behavior

  1. The result is displayed as empty
  2. Report #value
    image
    image

Running environment

No response

system message

No response

@Dushusir
Copy link
Member

Dushusir commented Mar 14, 2024

类似 =SUM("1") =ACOS("1"),应该是所有的计算类型的函数都需要默认转化字符串数字和布尔值,比如 =SUM("1",TRUE) 为 2。

但是引用中的字符串数字和布尔值一般不转化,比如=SUM(A2,B2) 其中A2为强制字符串1,B2为TRUE,结果为 0。(强制字符串功能还没做,暂时无法测试)

如下Excel
image

目前已实现的函数中,数学与三角函数、统计这两个分类中的函数有此特性。

@Issues-translate-bot
Copy link

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


Similar to =SUM("1") =ACOS("1"), all calculation-type functions should convert string numbers and Boolean values ​​by default, such as =SUM("1",TRUE) to 2.
However, string numbers and Boolean values ​​in references are generally not converted, such as =SUM(A2,B2) where A2 is the mandatory string 1, B2 is TRUE, and the result is 0.

Excel as follows
image

Among the functions that have been implemented so far, functions in the two categories of mathematics, trigonometric functions, and statistics have this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scope:formula
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants