diff options
author | xuri <xuri.me@gmail.com> | 2021-02-19 00:03:51 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2021-02-19 00:20:27 +0800 |
commit | 9154d500cf50621e15bf4a2bb9f6b5045d7b72d2 (patch) | |
tree | 102031d4b81c3d62a6d103d12544b96ea54d937c /cell.go | |
parent | ae6f56b9531d6dce437a719523c1a9c67b97f776 (diff) |
ref: #756, set cell as blank when SetCellValue with nil #756, new formula fn: BITAND, BITLSHIFT, BITOR, BITRSHIFT, BITXOR
Diffstat (limited to 'cell.go')
-rw-r--r-- | cell.go | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,4 @@ -// Copyright 2016 - 2020 The excelize Authors. All rights reserved. Use of +// Copyright 2016 - 2021 The excelize Authors. All rights reserved. Use of // this source code is governed by a BSD-style license that can be found in // the LICENSE file. // @@ -44,8 +44,9 @@ func (f *File) GetCellValue(sheet, axis string) (string, error) { } // SetCellValue provides a function to set value of a cell. The specified -// coordinates should not be in the first row of the table. The following -// shows the supported data types: +// coordinates should not be in the first row of the table, a complex number +// can be set with string text. The following shows the supported data +// types: // // int // int8 @@ -93,7 +94,7 @@ func (f *File) SetCellValue(sheet, axis string, value interface{}) error { case bool: err = f.SetCellBool(sheet, axis, v) case nil: - break + err = f.SetCellDefault(sheet, axis, "") default: err = f.SetCellStr(sheet, axis, fmt.Sprint(value)) } |