我正在尝试使用ExcelPackage在" EPPlus.Core.dll"中导出excel var training = dbContext.tblTraining.Where(tc => tc.ID == ID)
var trainingVm = new TrainingVm {
Training = training.FirstOrDefault(), // should be only one
};
if(includeQuestions)
{
var questions = training.Select(tc => new QuestionsQueryVm
{
Questions = tc.tblQuestions.Where(qq => qq.IsActive == true),
Answers = tc.tblQuestions.Select(qq => qq.tblAnswers.Where(qa => qa.IsActive == true)),
});
trainingVm.Questions = questions;
}
if(includeEmployeeTrainings)
{
employeeTraining = training.Select(tc => newEmplyoeeTraingVm
{
EmployeeTrainings = tc.tblEmployeeTrainings.AsEnumerable()
});
trainingVm.EmployeeTraining = employeeTraining;
}
。它在除safari之外的所有浏览器中都能正常工作。
我使用了以下内容类型进行导出。
.NET core
有没有办法在safari中导出excel? 请帮我解决这个问题。