Skip to content

Commit 79f444b

Browse files
author
changrui.0608
committed
fix SheetContent when parsing floats with E notation
1 parent 5adf90a commit 79f444b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

type_sheet_content.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (r *SheetContent) UnmarshalJSON(bytes []byte) error {
154154
} else if (bytes[0] >= '0' && bytes[0] <= '9') ||
155155
(bytes[0] == '-' && len(bytes) > 1 && bytes[1] >= '0' && bytes[1] <= '9') {
156156
str := string(bytes)
157-
if strings.Contains(str, ".") {
157+
if strings.ContainsAny(str, ".eE") {
158158
float, err := strconv.ParseFloat(str, 64)
159159
if err != nil {
160160
return err

0 commit comments

Comments
 (0)