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 --- file.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'file.go') diff --git a/file.go b/file.go index 8a37aef..36b1a42 100644 --- a/file.go +++ b/file.go @@ -14,7 +14,6 @@ package excelize import ( "archive/zip" "bytes" - "errors" "fmt" "io" "os" @@ -66,7 +65,7 @@ func (f *File) Save() error { // provided path. func (f *File) SaveAs(name string, opt ...Options) error { if len(name) > MaxFileNameLength { - return errors.New("file name length exceeds maximum limit") + return ErrMaxFileNameLength } file, err := os.OpenFile(name, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0666) if err != nil { -- cgit v1.2.1