Update String method to return a floatvalue point cast to string instead of datetime value.
This commit is contained in:
parent
4a6cf26307
commit
6b85cf262c
7
col.go
7
col.go
@ -2,13 +2,11 @@ package xls
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
yymmdd "github.com/extrame/goyymmdd"
|
||||||
"math"
|
"math"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
yymmdd "github.com/extrame/goyymmdd"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//content type
|
//content type
|
||||||
@ -71,8 +69,7 @@ func (xf *XfRk) String(wb *WorkBook) string {
|
|||||||
if !isFloat {
|
if !isFloat {
|
||||||
f = float64(i)
|
f = float64(i)
|
||||||
}
|
}
|
||||||
t := timeFromExcelTime(f, wb.dateMode == 1)
|
return strconv.FormatFloat(f, 'f', 6, 64)
|
||||||
return yymmdd.Format(t, formatter.str)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// see http://www.openoffice.org/sc/excelfileformat.pdf Page #174
|
// see http://www.openoffice.org/sc/excelfileformat.pdf Page #174
|
||||||
|
Loading…
x
Reference in New Issue
Block a user