diff options
author | xuri <xuri.me@gmail.com> | 2020-09-18 22:20:58 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-09-18 22:20:58 +0800 |
commit | 324f87bcaed9ec775c0b79627956a093ad481d36 (patch) | |
tree | 56a779bde041b3dae82ab0f2e827ed0021c3d602 /col.go | |
parent | 96917e4617c9e7eb15c0ee1723a042f169321430 (diff) |
add checking and limits for the worksheet
Diffstat (limited to 'col.go')
-rw-r--r-- | col.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -444,6 +444,9 @@ func (f *File) SetColWidth(sheet, startcol, endcol string, width float64) error if err != nil { return err } + if width > MaxColumnWidth { + return errors.New("the width of the column must be smaller than or equal to 255 characters") + } if min > max { min, max = max, min } |