summaryrefslogtreecommitdiff
path: root/file.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-05-20 20:46:29 +0800
committerxuri <xuri.me@gmail.com>2022-05-20 20:46:29 +0800
commit63adac25897f295ef4493e060d917650f03ebd3b (patch)
tree5153f2be474304832fe4420905a922013bb2088f /file.go
parent8f16a76781fb8f47094492c38a02c2cdc4ce5013 (diff)
make workbook open filed exception message clear
- New exported constant `ErrWorkbookPassword` - Rename exported constant `ErrWorkbookExt` to `ErrWorkbookFileFormat`
Diffstat (limited to 'file.go')
-rw-r--r--file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.go b/file.go
index 1d3360e..ecdadf4 100644
--- a/file.go
+++ b/file.go
@@ -78,7 +78,7 @@ func (f *File) SaveAs(name string, opt ...Options) error {
".xltx": ContentTypeTemplate,
}[filepath.Ext(f.Path)]
if !ok {
- return ErrWorkbookExt
+ return ErrWorkbookFileFormat
}
f.setContentTypePartProjectExtensions(contentType)
file, err := os.OpenFile(filepath.Clean(name), os.O_WRONLY|os.O_TRUNC|os.O_CREATE, os.ModePerm)