summaryrefslogtreecommitdiff
path: root/cell.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2022-02-08 00:08:06 +0800
committerxuri <xuri.me@gmail.com>2022-02-08 00:08:06 +0800
commit3f8f4f52e68d408da5a2e5108af3cc99bf8586bc (patch)
tree95ee799ee12d078b5dc12463417990acd2cb676a /cell.go
parent0f1fcb78d5518695cb80cc2266290e37df38a1ee (diff)
This closes #1139, `SetCellDefault` support non-numeric value
- Add default value on getting `View` property of sheet views - Add examples and unit test for set sheet views - Re-order field on sheet view options - Fix incorrect build-in number format: 42 - Simplify code for the `stylesReader` function
Diffstat (limited to 'cell.go')
-rw-r--r--cell.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/cell.go b/cell.go
index 35060ab..9af93f6 100644
--- a/cell.go
+++ b/cell.go
@@ -450,6 +450,9 @@ func (f *File) SetCellDefault(sheet, axis, value string) error {
// setCellDefault prepares cell type and string type cell value by a given
// string.
func setCellDefault(value string) (t string, v string) {
+ if ok, _ := isNumeric(value); !ok {
+ t = "str"
+ }
v = value
return
}