From 1bc5302007e04b83ed542fee993e9a79aea9e370 Mon Sep 17 00:00:00 2001 From: xuri Date: Wed, 20 Jan 2021 00:14:21 +0800 Subject: Fixed #764, add a condition for round precision --- rows.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rows.go') diff --git a/rows.go b/rows.go index 1e29d8f..44c4b64 100644 --- a/rows.go +++ b/rows.go @@ -20,6 +20,7 @@ import ( "log" "math" "strconv" + "strings" "github.com/mohae/deepcopy" ) @@ -345,7 +346,8 @@ func (c *xlsxC) getValueFrom(f *File, d *xlsxSST) (string, error) { } return f.formattedValue(c.S, c.V), nil default: - if len(c.V) > 16 { + splited := strings.Split(c.V, ".") + if len(splited) == 2 && len(splited[1]) > 15 { val, err := roundPrecision(c.V) if err != nil { return "", err -- cgit v1.2.1