summaryrefslogtreecommitdiff
path: root/calc.go
diff options
context:
space:
mode:
authorgonghaibinx <116247046+gonghaibinx@users.noreply.github.com>2022-10-21 00:04:32 +0800
committerGitHub <noreply@github.com>2022-10-21 00:04:32 +0800
commitf843a9ea56710deb4cdb77ea2cd3a08d8d82d3e6 (patch)
treec51e18bdd69c3f4346264e75cc1c658c86433c65 /calc.go
parent2df615fa2831bd578371d4e3606f16461c474ce7 (diff)
Fix the formula calculation result issue of the OR function (#1374)
Co-authored-by: gonghaibin <gonghaibin@qq.com>
Diffstat (limited to 'calc.go')
-rw-r--r--calc.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/calc.go b/calc.go
index 5d55992..796ca16 100644
--- a/calc.go
+++ b/calc.go
@@ -11623,6 +11623,9 @@ func (fn *formulaFuncs) OR(argsList *list.List) formulaArg {
return newErrorFormulaArg(formulaErrorVALUE, formulaErrorVALUE)
case ArgNumber:
or = token.Number != 0
+ if or {
+ return newStringFormulaArg(strings.ToUpper(strconv.FormatBool(or)))
+ }
case ArgMatrix:
// TODO
return newErrorFormulaArg(formulaErrorVALUE, formulaErrorVALUE)