From b8b06ac1dde6a979a4c9200e9ce19ad8e92bac63 Mon Sep 17 00:00:00 2001 From: Federico Simoncelli Date: Fri, 27 Mar 2020 21:08:35 +0100 Subject: [PATCH] support date format --- col.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/col.go b/col.go index 9ba155d..c1d53d6 100644 --- a/col.go +++ b/col.go @@ -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)} }