From c7161031dee321a830e2a7d4ecc1dbffa8f8a8bc Mon Sep 17 00:00:00 2001 From: Kyungmin Bae Date: Mon, 25 Sep 2023 22:01:58 +0900 Subject: [PATCH] Support bool type values on Cell.SetValue() --- cell.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cell.go b/cell.go index b4314b91..3a839894 100644 --- a/cell.go +++ b/cell.go @@ -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: @@ -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: