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 --- rows.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rows.go') 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 -- cgit v1.2.1