From 63adac25897f295ef4493e060d917650f03ebd3b Mon Sep 17 00:00:00 2001 From: xuri Date: Fri, 20 May 2022 20:46:29 +0800 Subject: make workbook open filed exception message clear - New exported constant `ErrWorkbookPassword` - Rename exported constant `ErrWorkbookExt` to `ErrWorkbookFileFormat` --- file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'file.go') 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) -- cgit v1.2.1