summaryrefslogtreecommitdiff
path: root/rows.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 /rows.go
parent96917e4617c9e7eb15c0ee1723a042f169321430 (diff)
add checking and limits for the worksheet
Diffstat (limited to 'rows.go')
-rw-r--r--rows.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/rows.go b/rows.go
index c6098e6..eb4b1df 100644
--- a/rows.go
+++ b/rows.go
@@ -225,7 +225,9 @@ func (f *File) SetRowHeight(sheet string, row int, height float64) error {
if row < 1 {
return newInvalidRowNumberError(row)
}
-
+ if height > MaxRowHeight {
+ return errors.New("the height of the row must be smaller than or equal to 409 points")
+ }
xlsx, err := f.workSheetReader(sheet)
if err != nil {
return err