private void WriteDataValue(uint rowIndex, uint columnIndex, object value) { string columnName = ExcelUtility.GetColumnNameFromIndex(columnIndex); IEnumerable <object> listValue = value as IEnumerable <object>; if (listValue != null) { value = string.Join(", ", listValue.Where(item => item != null).Select(item => item.ToString())); } ExcelUtility.SetSharedStringCell(Document, Worksheet, columnName, rowIndex, value.ToString()); }
private void WriteColumnHeading(uint columnIndex, string headerName) { string columnName = ExcelUtility.GetColumnNameFromIndex(columnIndex); ExcelUtility.EnsureColumn(Worksheet, columnIndex); if (columnIndex > 1) { ExcelUtility.CopyCell(Worksheet, "A", HeaderRowIndex, columnName, HeaderRowIndex); } ExcelUtility.SetSharedStringCell(Document, Worksheet, columnName, HeaderRowIndex, headerName); }