public void RowAdded(IList<CellData> cellsData, bool isNewGroupStarted)
{
//todo: isNewGroupStarted ?
_col = 1;
foreach (var item in cellsData)
{
var itemType = typeof(string);
if (item.PropertyValue != null)
{
itemType = item.PropertyValue.GetType();
}
if (isByteArrayImageField(item))
{
addImageFromStream((byte[])item.PropertyValue);
}
else if (isImageFilePathField(item))
{
addImageFromFile(item);
}
else if (itemType.IsNumericType())
{
setNumericItem(item);
}
else if (!string.IsNullOrEmpty(item.FormattedValue))
{
_worksheet.Cells[_row, _col].Value = item.FormattedValue.ToSafeString();
}
else if (itemType == typeof(DateTime))
{
setDateTimeItem(item);
}
else if (itemType == typeof(TimeSpan))
{
setTimeSpanItem(item);
}
else
{
_worksheet.Cells[_row, _col].Value = item.PropertyValue;
}
formatCell(item);
_col++;
}
setGroups(isNewGroupStarted);
_row++;
}