我需要使用servlet将excel下载到客户端的excel文件中。我首先通过从mysql表中获取值然后下载它来创建一个excel。 excel是在提供的路径中创建的,但我无法下载它。请在下面找到我的代码供下载:
var result = from a in liabilites
group a by a.DriverC into g
select new {
DriverC = g.First().DriverC,
Description = g.First().Description,
Liabilities = g.Where(x=>x.LiabilitiesC == 1).Sum(a=>a.Amount)??0,
Payment = g.Where(x=>x.LiabilitiesC == 0).Sum(a=>a.Amount)??0,
Date = g.First().Date
};
Console.WriteLine(result);
如果我在这里做错了,请帮助我理解。