20
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 { func (xf *XfRk) String(wb *WorkBook) string {
switch wb.Xfs[21].formatNo() { if len(wb.Xfs) > 21 {
case 27: switch wb.Xfs[21].formatNo() {
if f, e := xf.Rk.Float(); e == nil { case 27:
t := timeFromExcelTime(f, true) if f, e := xf.Rk.Float(); e == nil {
return t.Format("2006.01") //TODO it should be international t := timeFromExcelTime(f, true)
return t.Format("2006.01") //TODO it should be international
}
} }
} }
return fmt.Sprintf("%s", xf.Rk.String()) return fmt.Sprintf("%s", xf.Rk.String())