如何在c#代码隐藏中连续打开2个excels
我想用c#连续打开两个excel工作簿(一个接一个)。我怎样才能做到这一点?? 我以前是这样的:如何在c#代码隐藏中连续打开2个excels,c#,asp.net,export-to-excel,C#,Asp.net,Export To Excel,我想用c#连续打开两个excel工作簿(一个接一个)。我怎样才能做到这一点?? 我以前是这样的: Response.ContentType = "application/vnd.ms-excel"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + File1 + ".xls"); Response.TransmitFile(savepath); HttpContext.Current.Applicati
Response.ContentType = "application/vnd.ms-excel";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + File1 + ".xls");
Response.TransmitFile(savepath);
HttpContext.Current.ApplicationInstance.CompleteRequest();
Response.ContentType = "application/vnd.ms-excel";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + File2 + ".xls");
Response.TransmitFile(savepath);
HttpContext.Current.ApplicationInstance.CompleteRequest();
但是,只有一个excel被传输,我如何才能得到第二个呢
“提前感谢”HTTP在这方面受到限制,每个请求只能处理一个响应-您需要考虑其他方法来实现这一点,例如通过客户端脚本发出多个请求,或者将您的文件合并到单个存档文件(如ZIP文件)在传输之前作为一个想法,您可以将两个excel文件合并为一个单独的表格。我没有看到文件下载支持在web上一次单击多个文件,除非已压缩。您好,您能给我发送压缩多个excel表格的代码库吗。我在谷歌上搜索了一下,什么都没找到。请寄给我代码库。非常紧急,非常感谢您的帮助。