summaryrefslogtreecommitdiff
path: root/rows.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2021-01-27 13:51:47 +0800
committerxuri <xuri.me@gmail.com>2021-01-27 13:51:47 +0800
commitb84bd1abc06457f6383013b8a600fc8c95eed2ed (patch)
treed45fdbb6092d634a5253fea1cf65da459c8fbcb6 /rows.go
parente568319bbca22011690a54c5f5741da2b50d0c7c (diff)
new formula fn: IF, LEN; not equal operator support and faster numeric precision process
Diffstat (limited to 'rows.go')
-rw-r--r--rows.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/rows.go b/rows.go
index 44c4b64..97cf2f5 100644
--- a/rows.go
+++ b/rows.go
@@ -20,7 +20,6 @@ import (
"log"
"math"
"strconv"
- "strings"
"github.com/mohae/deepcopy"
)
@@ -346,12 +345,9 @@ func (c *xlsxC) getValueFrom(f *File, d *xlsxSST) (string, error) {
}
return f.formattedValue(c.S, c.V), nil
default:
- splited := strings.Split(c.V, ".")
- if len(splited) == 2 && len(splited[1]) > 15 {
- val, err := roundPrecision(c.V)
- if err != nil {
- return "", err
- }
+ isNum, precision := isNumeric(c.V)
+ if isNum && precision > 15 {
+ val, _ := roundPrecision(c.V)
if val != c.V {
return f.formattedValue(c.S, val), nil
}