Skip to content

Commit

Permalink
Support bool type values on Cell.SetValue()
Browse files Browse the repository at this point in the history
  • Loading branch information
WKBae committed Sep 25, 2023
1 parent e01f87e commit c716103
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cell.go
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ func (c *Cell) SetValue(n interface{}) {
switch t := n.(type) {
case time.Time:
c.SetDateTime(t)
return
case int, int8, int16, int32, int64:
c.SetNumeric(fmt.Sprintf("%d", n))
case float64:
Expand All @@ -412,6 +411,8 @@ func (c *Cell) SetValue(n interface{}) {
c.SetString(t)
case []byte:
c.SetString(string(t))
case bool:
c.SetBool(t)
case nil:
c.SetString("")
default:
Expand Down

0 comments on commit c716103

Please sign in to comment.