diff --git a/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs b/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs index bf72cd9..635a819 100644 --- a/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs +++ b/ClosedXML/ClosedXML/ClosedXML/Excel/Cells/XLCell.cs @@ -1101,7 +1101,12 @@ if (value == null) _worksheet.Cell(ro, co).SetValue(String.Empty); else - _worksheet.Cell(ro, co).SetValue((T)Convert.ChangeType(value, typeof(T))); + { + if (value is IConvertible) + _worksheet.Cell(ro, co).SetValue((T)Convert.ChangeType(value, typeof(T))); + else + _worksheet.Cell(ro, co).SetValue(value); + } } private void SetValue(object value)