diff options
author | xuri <xuri.me@gmail.com> | 2021-07-08 00:52:07 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-07-08 00:52:07 +0800 |
commit | 4f0d676eb765472d1fe7a29cacd165b982785bd2 (patch) | |
tree | ccf5057aa8beeff38b6948c3dd5541fe0003d399 /col.go | |
parent | 90d200a10ba4d8c2ae2eff47ad8e1cca0ab28e76 (diff) |
Fix missing set each cell's styles when set columns style
Diffstat (limited to 'col.go')
-rw-r--r-- | col.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -435,6 +435,13 @@ func (f *File) SetColStyle(sheet, columns string, styleID int) error { fc.Width = c.Width return fc }) + if rows := len(ws.SheetData.Row); rows > 0 { + for col := start; col <= end; col++ { + from, _ := CoordinatesToCellName(col, 1) + to, _ := CoordinatesToCellName(col, rows) + f.SetCellStyle(sheet, from, to, styleID) + } + } return nil } |