From 3f8f4f52e68d408da5a2e5108af3cc99bf8586bc Mon Sep 17 00:00:00 2001 From: xuri Date: Tue, 8 Feb 2022 00:08:06 +0800 Subject: 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 --- cell.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cell.go') 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 } -- cgit v1.2.1