Skip to content

Commit

Permalink
support date format
Browse files Browse the repository at this point in the history
  • Loading branch information
simon3z committed Mar 28, 2020
1 parent 0ecbf4c commit b8b06ac
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions col.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@ type NumberCol struct {
}

func (c *NumberCol) String(wb *WorkBook) []string {
if fNo := wb.Xfs[c.Index].formatNo(); fNo != 0 {
t := timeFromExcelTime(c.Float, wb.dateMode == 1)
return []string{yymmdd.Format(t, wb.Formats[fNo].str)}
}
return []string{strconv.FormatFloat(c.Float, 'f', -1, 64)}
}

Expand Down

0 comments on commit b8b06ac

Please sign in to comment.