diff options
author | xuri <xuri.me@gmail.com> | 2022-05-20 20:46:29 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2022-05-20 20:46:29 +0800 |
commit | 63adac25897f295ef4493e060d917650f03ebd3b (patch) | |
tree | 5153f2be474304832fe4420905a922013bb2088f /file.go | |
parent | 8f16a76781fb8f47094492c38a02c2cdc4ce5013 (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.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |