summaryrefslogtreecommitdiff
path: root/col.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2020-11-18 22:08:40 +0800
committerxuri <xuri.me@gmail.com>2020-11-18 22:08:40 +0800
commit92c8626f814c3bcb91e30f83de8e68c9b8bb9a5f (patch)
tree86fec139f87ffbbad0ea3f136a622beb1c189ac2 /col.go
parent2be4bfd410744201f96e79804ef644d26c47f49f (diff)
Fixed #732, support single line with repeated row element in the sheet data
Diffstat (limited to 'col.go')
-rw-r--r--col.go7
1 files changed, 3 insertions, 4 deletions
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" {