diff options
author | MJacred <loesch.benny92@gmx.de> | 2022-07-14 17:36:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-14 23:36:43 +0800 |
commit | 6429588e1448f70539774a88840f094829cb9e07 (patch) | |
tree | be54a60658885cfb27d037f06af457dda5644c3a /calc.go | |
parent | e37724c22b95de974f0235e992236d555aa6ad12 (diff) |
adjust `ErrColumnNumber`, rename `TotalColumns` to `MaxColumns` and add new constant `MinColumns` (#1272)
Signed-off-by: Benjamin Lösch <loesch.benny92@gmx.de>
Diffstat (limited to 'calc.go')
-rw-r--r-- | calc.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1419,7 +1419,7 @@ func (f *File) parseReference(ctx *calcContext, sheet, reference string) (arg fo err = newInvalidColumnNameError(tokens[1]) return } - cr.Col = TotalColumns + cr.Col = MaxColumns } } if refs.Len() > 0 { @@ -1439,7 +1439,7 @@ func (f *File) parseReference(ctx *calcContext, sheet, reference string) (arg fo err = newInvalidColumnNameError(tokens[0]) return } - cr.Col = TotalColumns + cr.Col = MaxColumns } cellRanges.PushBack(cellRange{ From: cellRef{Sheet: sheet, Col: cr.Col, Row: 1}, @@ -14457,8 +14457,8 @@ func (fn *formulaFuncs) COLUMNS(argsList *list.List) formulaArg { return newErrorFormulaArg(formulaErrorVALUE, "COLUMNS requires 1 argument") } min, max := calcColumnsMinMax(argsList) - if max == TotalColumns { - return newNumberFormulaArg(float64(TotalColumns)) + if max == MaxColumns { + return newNumberFormulaArg(float64(MaxColumns)) } result := max - min + 1 if max == min { |