Merge branch 'master' into master

This commit is contained in:
Lucas Liu
2020-04-26 20:45:52 +08:00
committed by GitHub
4 changed files with 78 additions and 13 deletions

19
col.go
View File

@@ -8,7 +8,7 @@ import (
"time"
"github.com/extrame/goyymmdd"
yymmdd "github.com/extrame/goyymmdd"
)
//content type
@@ -72,7 +72,6 @@ func (xf *XfRk) String(wb *WorkBook) string {
f = float64(i)
}
t := timeFromExcelTime(f, wb.dateMode == 1)
return yymmdd.Format(t, formatter.str)
}
}
@@ -169,9 +168,25 @@ 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)}
}
type FormulaStringCol struct {
Col
RenderedValue string
}
func (c *FormulaStringCol) String(wb *WorkBook) []string {
return []string{c.RenderedValue}
}
//str, err = wb.get_string(buf_item, size)
//wb.sst[offset_pre] = wb.sst[offset_pre] + str
type FormulaCol struct {
Header struct {
Col