using (MemoryStream file = db.ExportExcel(model)) { context.Response.ContentType = "application/vnd.ms-excel"; context.Response.AddHeader("Content-Disposition", string.Format("attachment;filename={0}", "历史告警数据.xls")); context.Response.Clear(); file.WriteTo(context.Response.OutputStream); context.Response.End(); }
时间: 2024-10-10 22:26:45