diff options
author | xuri <xuri.me@gmail.com> | 2021-11-16 00:40:44 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-11-16 00:40:44 +0800 |
commit | bda8e7f8129dae0064c47f8e051f76492e1128f5 (patch) | |
tree | f920fccbda3059acdf0c0cb66ebb875161a32576 /datavalidation.go | |
parent | 72410361b07e7539037252467a38a73b32986dce (diff) |
This closes #1061, support multi-byte language on set header footer
typo fixed and simplify code for read the data values arguments of formula functions
Diffstat (limited to 'datavalidation.go')
-rw-r--r-- | datavalidation.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/datavalidation.go b/datavalidation.go index 047a53c..80a0295 100644 --- a/datavalidation.go +++ b/datavalidation.go @@ -35,11 +35,6 @@ const ( DataValidationTypeWhole ) -const ( - // dataValidationFormulaStrLen 255 characters - dataValidationFormulaStrLen = 255 -) - // DataValidationErrorStyle defined the style of data validation error alert. type DataValidationErrorStyle int @@ -120,7 +115,7 @@ func (dd *DataValidation) SetInput(title, msg string) { // SetDropList data validation list. func (dd *DataValidation) SetDropList(keys []string) error { formula := strings.Join(keys, ",") - if dataValidationFormulaStrLen < len(utf16.Encode([]rune(formula))) { + if MaxFieldLength < len(utf16.Encode([]rune(formula))) { return ErrDataValidationFormulaLenth } dd.Formula1 = fmt.Sprintf(`<formula1>"%s"</formula1>`, formulaEscaper.Replace(formula)) |