From be12cc27f1d774154b17763c071e1dc6f91eab8c Mon Sep 17 00:00:00 2001 From: xuri Date: Mon, 10 May 2021 00:09:24 +0800 Subject: This closes #652, new SetColWidth API, support set column width in stream writing mode, and export error message --- col.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'col.go') diff --git a/col.go b/col.go index 09a172a..e1ac5a5 100644 --- a/col.go +++ b/col.go @@ -14,7 +14,6 @@ package excelize import ( "bytes" "encoding/xml" - "errors" "math" "strconv" "strings" @@ -360,7 +359,7 @@ func (f *File) parseColRange(columns string) (start, end int, err error) { // func (f *File) SetColOutlineLevel(sheet, col string, level uint8) error { if level > 7 || level < 1 { - return errors.New("invalid outline level") + return ErrOutlineLevel } colNum, err := ColumnNameToNumber(col) if err != nil { @@ -452,7 +451,7 @@ func (f *File) SetColWidth(sheet, startcol, endcol string, width float64) error return err } if width > MaxColumnWidth { - return errors.New("the width of the column must be smaller than or equal to 255 characters") + return ErrColumnWidth } if min > max { min, max = max, min -- cgit v1.2.1