diff options
author | xuri <xuri.me@gmail.com> | 2021-02-08 18:05:15 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-02-08 18:05:15 +0800 |
commit | 30549c5e90884789fff6599d6e773d1ca56ba962 (patch) | |
tree | f8df8c92279358fc6e3cd5ed8573bbaa794f0162 /sheet.go | |
parent | 2fb135bc94bbb0c487563d166fd24786fab7280a (diff) |
fix custom row height check issue
Diffstat (limited to 'sheet.go')
-rw-r--r-- | sheet.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -860,18 +860,18 @@ func (f *File) searchSheet(name, value string, regSearch bool) (result []string, } break } - switch startElement := token.(type) { + switch xmlElement := token.(type) { case xml.StartElement: - inElement = startElement.Name.Local + inElement = xmlElement.Name.Local if inElement == "row" { - row, err = attrValToInt("r", startElement.Attr) + row, err = attrValToInt("r", xmlElement.Attr) if err != nil { return } } if inElement == "c" { colCell := xlsxC{} - _ = decoder.DecodeElement(&colCell, &startElement) + _ = decoder.DecodeElement(&colCell, &xmlElement) val, _ := colCell.getValueFrom(f, d) if regSearch { regex := regexp.MustCompile(value) @@ -1745,7 +1745,7 @@ func prepareSheetXML(ws *xlsxWorksheet, col int, row int) { sizeHint := 0 var ht float64 var customHeight bool - if ws.SheetFormatPr != nil { + if ws.SheetFormatPr != nil && ws.SheetFormatPr.CustomHeight { ht = ws.SheetFormatPr.DefaultRowHeight customHeight = true } |