Merge pull request #475 from mqy/master

add missing error check in SetSheetRow()
formula
xuri 5 years ago committed by GitHub
commit da99334fca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -471,12 +471,14 @@ func (f *File) SetSheetRow(sheet, axis string, slice interface{}) error {
for i := 0; i < v.Len(); i++ { for i := 0; i < v.Len(); i++ {
cell, err := CoordinatesToCellName(col+i, row) cell, err := CoordinatesToCellName(col+i, row)
// Error should never happens here. But keep ckecking to early detect regresions // Error should never happens here. But keep checking to early detect regresions
// if it will be introduced in furure // if it will be introduced in future.
if err != nil { if err != nil {
return err return err
} }
f.SetCellValue(sheet, cell, v.Index(i).Interface()) if err := f.SetCellValue(sheet, cell, v.Index(i).Interface()); err != nil {
return err
}
} }
return err return err
} }

Loading…
Cancel
Save