From 9154d500cf50621e15bf4a2bb9f6b5045d7b72d2 Mon Sep 17 00:00:00 2001 From: xuri Date: Fri, 19 Feb 2021 00:03:51 +0800 Subject: ref: #756, set cell as blank when SetCellValue with nil #756, new formula fn: BITAND, BITLSHIFT, BITOR, BITRSHIFT, BITXOR --- cell.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cell.go') diff --git a/cell.go b/cell.go index 3e63565..4617b76 100644 --- a/cell.go +++ b/cell.go @@ -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)) } -- cgit v1.2.1