diff options
author | xuri <xuri.me@gmail.com> | 2021-05-10 00:09:24 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-05-10 00:09:24 +0800 |
commit | be12cc27f1d774154b17763c071e1dc6f91eab8c (patch) | |
tree | d6544c2e33e8aacfb0867e79ffc69fde435d3183 /col.go | |
parent | 423bc26d1f87db55bab5704afebf4509269bbc7e (diff) |
This closes #652, new SetColWidth API, support set column width in stream writing mode, and export error message
Diffstat (limited to 'col.go')
-rw-r--r-- | col.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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 |