From eaf9781e7e51d5aacf238c9cb39a249097abed33 Mon Sep 17 00:00:00 2001 From: Arnie97 Date: Sat, 31 Jul 2021 14:20:29 +0800 Subject: Improve compatibility for SetRichText (#976) - support escaped string literal - maximum character limit added - fix missing preserve character in some case Co-authored-by: xuri --- errors.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'errors.go') diff --git a/errors.go b/errors.go index 6b32563..0edb697 100644 --- a/errors.go +++ b/errors.go @@ -45,7 +45,7 @@ var ( ErrColumnNumber = errors.New("column number exceeds maximum limit") // ErrColumnWidth defined the error message on receive an invalid column // width. - ErrColumnWidth = errors.New("the width of the column must be smaller than or equal to 255 characters") + ErrColumnWidth = fmt.Errorf("the width of the column must be smaller than or equal to %d characters", MaxColumnWidth) // ErrOutlineLevel defined the error message on receive an invalid outline // level number. ErrOutlineLevel = errors.New("invalid outline level") @@ -111,4 +111,7 @@ var ( // ErrDataValidationRange defined the error message on set decimal range // exceeds limit. ErrDataValidationRange = errors.New("data validation range exceeds limit") + // ErrCellCharsLength defined the error message for receiving a cell + // characters length that exceeds the limit. + ErrCellCharsLength = fmt.Errorf("cell value must be 0-%d characters", TotalCellChars) ) -- cgit v1.2.1