From 64809db2c9ee30779e4839e9d60a315479092ce6 Mon Sep 17 00:00:00 2001 From: mqy Date: Mon, 19 Aug 2019 15:53:56 +0800 Subject: [PATCH] add missing error check in SetSheetRow() --- cell.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cell.go b/cell.go index 9d478a59..e8973794 100644 --- a/cell.go +++ b/cell.go @@ -471,12 +471,14 @@ func (f *File) SetSheetRow(sheet, axis string, slice interface{}) error { for i := 0; i < v.Len(); i++ { cell, err := CoordinatesToCellName(col+i, row) - // Error should never happens here. But keep ckecking to early detect regresions - // if it will be introduced in furure + // Error should never happens here. But keep checking to early detect regresions + // if it will be introduced in future. if err != nil { 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 }