mirror of
https://github.com/unidoc/unioffice.git
synced 2025-04-25 13:48:53 +08:00
spreadsheet: return empty values from sheet context
This is required as AVERAGE/AVERAGEA need to distinguish between empty and non-empty cells.
This commit is contained in:
parent
b056033c12
commit
e7da598399
@ -35,9 +35,8 @@ func (e *evalContext) Cell(ref string, ev formula.Evaluator) formula.Result {
|
||||
return res
|
||||
}
|
||||
|
||||
// Evaluating an empty cell returns a zero in Excel
|
||||
if c.IsEmpty() {
|
||||
return formula.MakeNumberResult(0)
|
||||
return formula.MakeEmptyResult()
|
||||
} else if c.IsNumber() {
|
||||
v, _ := c.GetValueAsNumber()
|
||||
return formula.MakeNumberResult(v)
|
||||
|
Loading…
x
Reference in New Issue
Block a user