From 92c8626f814c3bcb91e30f83de8e68c9b8bb9a5f Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 18 Nov 2020 22:08:40 +0800 Subject: Fixed #732, support single line with repeated row element in the sheet data --- col.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'col.go') diff --git a/col.go b/col.go index f3e502c..5d91229 100644 --- a/col.go +++ b/col.go @@ -103,10 +103,9 @@ func (cols *Cols) Rows() ([]string, error) { if inElement == "row" { cellCol = 0 cellRow++ - for _, attr := range startElement.Attr { - if attr.Name.Local == "r" { - cellRow, _ = strconv.Atoi(attr.Value) - } + attrR, _ := attrValToInt("r", startElement.Attr) + if attrR != 0 { + cellRow = attrR } } if inElement == "c" { -- cgit v1.2.1