diff options
author | xuri <xuri.me@gmail.com> | 2020-03-10 00:04:23 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2020-03-10 00:04:23 +0800 |
commit | 9e2318cefa4ebaa7bf6b1dbc95b30ad7a32366b1 (patch) | |
tree | 5662b564bb64068e0f60f1ade1dd5679f9df3974 /excelize.go | |
parent | 2ccb8f62edd5d1ce039e663591964b9066fd2f4e (diff) |
Resolve #470, export Style structs to allow create the style for cells by given JSON or structure
Diffstat (limited to 'excelize.go')
-rw-r--r-- | excelize.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/excelize.go b/excelize.go index 0962122..795120d 100644 --- a/excelize.go +++ b/excelize.go @@ -137,7 +137,7 @@ func (f *File) setDefaultTimeStyle(sheet, axis string, format int) error { return err } if s == 0 { - style, _ := f.NewStyle(`{"number_format": ` + strconv.Itoa(format) + `}`) + style, _ := f.NewStyle(&Style{NumFmt: format}) _ = f.SetCellStyle(sheet, axis, axis, style) } return err |