diff options
| author | xuri <xuri.me@gmail.com> | 2021-01-20 00:14:21 +0800 |
|---|---|---|
| committer | xuri <xuri.me@gmail.com> | 2021-01-20 00:14:21 +0800 |
| commit | 1bc5302007e04b83ed542fee993e9a79aea9e370 (patch) | |
| tree | 3b7a1feb954e0f535dda2a6ecd1ebb9683e1b41a /rows.go | |
| parent | b260485f29038ca8df9993edb1c021672b3df7e4 (diff) | |
Fixed #764, add a condition for round precision
Diffstat (limited to 'rows.go')
| -rw-r--r-- | rows.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |
