21
0

fix the xf error

This commit is contained in:
Liu Ming 2015-10-30 16:01:42 +08:00
parent 8fbc98155b
commit ddee605f8f

12
col.go
View File

@ -43,11 +43,13 @@ type XfRk struct {
}
func (xf *XfRk) String(wb *WorkBook) string {
switch wb.Xfs[21].formatNo() {
case 27:
if f, e := xf.Rk.Float(); e == nil {
t := timeFromExcelTime(f, true)
return t.Format("2006.01") //TODO it should be international
if len(wb.Xfs) > 21 {
switch wb.Xfs[21].formatNo() {
case 27:
if f, e := xf.Rk.Float(); e == nil {
t := timeFromExcelTime(f, true)
return t.Format("2006.01") //TODO it should be international
}
}
}
return fmt.Sprintf("%s", xf.Rk.String())