- Avoid allocate memory for reading continuously empty rows on the tail of the worksheet
This commit is contained in:
parent
5f8a5b8690
commit
3e636ae7b2
5
rows.go
5
rows.go
|
@ -70,8 +70,11 @@ func (f *File) GetRows(sheet string, opts ...Options) ([][]string, error) {
|
|||
if err != nil {
|
||||
break
|
||||
}
|
||||
results = append(results, row)
|
||||
if len(row) > 0 {
|
||||
if emptyRows := cur - maxVal - 1; emptyRows > 0 {
|
||||
results = append(results, make([][]string, emptyRows)...)
|
||||
}
|
||||
results = append(results, row)
|
||||
maxVal = cur
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue