提交 66349f8e 编写于 作者: xurime's avatar xurime

Handle number formats out of built-in range exception by returning raw value, relate issue #50.

上级 8fbab474
......@@ -66,7 +66,11 @@ func (f *File) formattedValue(s int, v string) string {
}
var styleSheet xlsxStyleSheet
xml.Unmarshal([]byte(f.readXML("xl/styles.xml")), &styleSheet)
return builtInNumFmtFunc[styleSheet.CellXfs.Xf[s].NumFmtID](styleSheet.CellXfs.Xf[s].NumFmtID, v)
ok := builtInNumFmtFunc[styleSheet.CellXfs.Xf[s].NumFmtID]
if ok != nil {
return ok(styleSheet.CellXfs.Xf[s].NumFmtID, v)
}
return v
}
// GetCellFormula provides function to get formula from cell by given sheet
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册