From 324f87bcaed9ec775c0b79627956a093ad481d36 Mon Sep 17 00:00:00 2001 From: xuri Date: Fri, 18 Sep 2020 22:20:58 +0800 Subject: add checking and limits for the worksheet --- file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'file.go') diff --git a/file.go b/file.go index bd05bc4..a35bc4d 100644 --- a/file.go +++ b/file.go @@ -65,7 +65,7 @@ func (f *File) Save() error { // SaveAs provides a function to create or update to an xlsx file at the // provided path. func (f *File) SaveAs(name string, opt ...Options) error { - if len(name) > FileNameLength { + if len(name) > MaxFileNameLength { return errors.New("file name length exceeds maximum limit") } file, err := os.OpenFile(name, os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0666) -- cgit v1.2.1