diff options
author | xuri <xuri.me@gmail.com> | 2021-01-27 13:51:47 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-01-27 13:51:47 +0800 |
commit | b84bd1abc06457f6383013b8a600fc8c95eed2ed (patch) | |
tree | d45fdbb6092d634a5253fea1cf65da459c8fbcb6 /rows.go | |
parent | e568319bbca22011690a54c5f5741da2b50d0c7c (diff) |
new formula fn: IF, LEN; not equal operator support and faster numeric precision process
Diffstat (limited to 'rows.go')
-rw-r--r-- | rows.go | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -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 } |