summaryrefslogtreecommitdiff
path: root/file.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-05-10 00:09:24 +0800
committerxuri <xuri.me@gmail.com>2021-05-10 00:09:24 +0800
commitbe12cc27f1d774154b17763c071e1dc6f91eab8c (patch)
treed6544c2e33e8aacfb0867e79ffc69fde435d3183 /file.go
parent423bc26d1f87db55bab5704afebf4509269bbc7e (diff)
This closes #652, new SetColWidth API, support set column width in stream writing mode, and export error message
Diffstat (limited to 'file.go')
-rw-r--r--file.go3
1 files changed, 1 insertions, 2 deletions
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 {