diff options
Diffstat (limited to 'cell.go')
-rw-r--r-- | cell.go | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1145,6 +1145,11 @@ func (f *File) prepareCellStyle(ws *xlsxWorksheet, col, row, style int) int { if style != 0 { return style } + if row <= len(ws.SheetData.Row) { + if styleID := ws.SheetData.Row[row-1].S; styleID != 0 { + return styleID + } + } if ws.Cols != nil { for _, c := range ws.Cols.Col { if c.Min <= col && col <= c.Max && c.Style != 0 { @@ -1152,11 +1157,6 @@ func (f *File) prepareCellStyle(ws *xlsxWorksheet, col, row, style int) int { } } } - if row <= len(ws.SheetData.Row) { - if styleID := ws.SheetData.Row[row-1].S; styleID != 0 { - return styleID - } - } return style } |