Skip to content

Commit cab4e03

Browse files
authored
Merge pull request #782 from WKBae/setvalue-bool
Support bool type values on Cell.SetValue()
2 parents 2f3ecd9 + c716103 commit cab4e03

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cell.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,6 @@ func (c *Cell) SetValue(n interface{}) {
396396
switch t := n.(type) {
397397
case time.Time:
398398
c.SetDateTime(t)
399-
return
400399
case int, int8, int16, int32, int64:
401400
c.SetNumeric(fmt.Sprintf("%d", n))
402401
case float64:
@@ -412,6 +411,8 @@ func (c *Cell) SetValue(n interface{}) {
412411
c.SetString(t)
413412
case []byte:
414413
c.SetString(string(t))
414+
case bool:
415+
c.SetBool(t)
415416
case nil:
416417
c.SetString("")
417418
default:

0 commit comments

Comments
 (0)