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 /adjust.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 'adjust.go')
-rw-r--r-- | adjust.go | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -12,7 +12,6 @@ package excelize import ( - "errors" "strings" ) @@ -219,7 +218,7 @@ func areaRangeToCoordinates(firstCell, lastCell string) ([]int, error) { // correct C1:B3 to B1:C3. func sortCoordinates(coordinates []int) error { if len(coordinates) != 4 { - return errors.New("coordinates length must be 4") + return ErrCoordinates } if coordinates[2] < coordinates[0] { coordinates[2], coordinates[0] = coordinates[0], coordinates[2] @@ -234,7 +233,7 @@ func sortCoordinates(coordinates []int) error { // to area reference. func (f *File) coordinatesToAreaRef(coordinates []int) (string, error) { if len(coordinates) != 4 { - return "", errors.New("coordinates length must be 4") + return "", ErrCoordinates } firstCell, err := CoordinatesToCellName(coordinates[0], coordinates[1]) if err != nil { |