1
0
mirror of https://github.com/pbnjay/grate.git synced 2024-12-12 13:35:18 +02:00

backup when dimensions not set

This commit is contained in:
Jeremy Jay 2021-02-15 00:24:56 -05:00
parent dbc4d374ba
commit 6f8e889d1e

View File

@ -94,13 +94,11 @@ func (s *WorkSheet) placeValue(rowIndex, colIndex int, val interface{}) {
// invalid
return
}
/*
// ensure we always have a complete matrix
for len(s.rows) <= rowIndex {
emptyRow := make([]interface{}, s.maxCol+1)
s.rows = append(s.rows, &row{emptyRow})
}
*/
// ensure we always have a complete matrix
for len(s.rows) <= rowIndex {
emptyRow := make([]interface{}, s.maxCol+1)
s.rows = append(s.rows, &row{emptyRow})
}
s.rows[rowIndex].cols[colIndex] = val
}