summaryrefslogtreecommitdiff
path: root/file.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2020-09-18 22:20:58 +0800
committerxuri <xuri.me@gmail.com>2020-09-18 22:20:58 +0800
commit324f87bcaed9ec775c0b79627956a093ad481d36 (patch)
tree56a779bde041b3dae82ab0f2e827ed0021c3d602 /file.go
parent96917e4617c9e7eb15c0ee1723a042f169321430 (diff)
add checking and limits for the worksheet
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 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)