dream-num / univer

Univer is an open-source productivity tool dev kit helping you integrate spreadsheets, docs and slides into your applications.
https://univer.ai
Apache License 2.0
6.47k stars 550 forks source link

iseven and isodd function give error when referencing a cell. It works when directly a number is passed #2782

Closed faisaluddin closed 1 month ago

faisaluddin commented 1 month ago

Before you submit this issue, have you checked the following

Affected packages and versions

formula engine

Reproduction link

https://univer.ai/playground?title=React

Expected behavior

isodd and iseven functions should work

Actual behavior

isodd and iseven functions give error. image

System information

No response

faisaluddin commented 1 month ago

The issue root cause seems to be that in the overriden calculate function the cell is passed an array an din that it just returns an error. I think implementing it the way isNumber function is done should resolve the issue image

Dushusir commented 1 month ago

Thank you for your feedback, we will fix it as soon as possible