summaryrefslogtreecommitdiff
path: root/file.go
diff options
context:
space:
mode:
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 a430c5f..e2aeb4a 100644
--- a/file.go
+++ b/file.go
@@ -14,7 +14,6 @@ package excelize
import (
"archive/zip"
"bytes"
- "fmt"
"io"
"os"
"path/filepath"
@@ -58,7 +57,7 @@ func NewFile() *File {
// Save provides a function to override the spreadsheet with origin path.
func (f *File) Save() error {
if f.Path == "" {
- return fmt.Errorf("no path defined for file, consider File.WriteTo or File.Write")
+ return ErrSave
}
return f.SaveAs(f.Path)
}