我正在从数据库中获取我的收藏
var exclCompany = companies.Select(u => new ExcelCompaniesViewModel
{
Id = u.Id,
IsEditedFirstTime = u.IsEditedFirstTime ? "Да" : "Нет",
IsLoggedFirstTime = u.IsLoggedFirstTime ? "Да" : "Нет",
Title = u.Title,
Description = u.Description,
Members = u.RmCompanyMembers.Select(p => new CompanyMemberViewModel
{
MemberDateLogin = "12/10/12",
MemberName = String.Format("{0} {1} {2}", p.LastName, p.FirstName, p.MiddleName),
TelephoneMemers = p.Phone
}).ToArray()
});
并插入工作表。
workSheet.Cell(2, 1).InsertData(exclCompany);
但在结果文件中,具有成员的单元格显示为:
System.Linq.Enumerable+WhereSelectEnumerableIterator
如何插入带有子集合的集合?