Skip to content

Commit ec31cce

Browse files
authored
Merge pull request #6 from tomtwinkle/fix/set-cell-value-override-style
fix: setCellValue() override cell style
2 parents 25365da + 3c8b122 commit ec31cce

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

excelizeam.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,14 @@ func (e *excelizeam) setCellValue(colIndex, rowIndex int, value interface{}, sty
202202
return err
203203
}
204204
cell.StyleID = styleID
205-
} else {
206-
styleID, err := e.getStyleID(style)
207-
if err != nil {
208-
return err
209-
}
210-
cell.StyleID = styleID
205+
return nil
211206
}
207+
styleID, err := e.getStyleID(style)
208+
if err != nil {
209+
return err
210+
}
211+
cell.StyleID = styleID
212+
return nil
212213
}
213214
styleID, err := e.getStyleID(style)
214215
if err != nil {
@@ -525,7 +526,7 @@ func (e *excelizeam) setBorderRange(startColIndex, startRowIndex, endColIndex, e
525526
if err != nil {
526527
return err
527528
}
528-
e.cellStore.Store(key, &Cell{
529+
e.cellStore.Store(colIdx, &Cell{
529530
StyleID: styleID,
530531
Value: nil,
531532
})

0 commit comments

Comments
 (0)