在網上找了一些方法,都不能實現下載完原網頁刷新一遍!!!!有沒網友瞭解這一塊的,謝謝!
using (MemoryStream stream = new MemoryStream())
{
workbook.Write(stream);
Response.Buffer = true;
Response.ContentType = "application/vnd.ms-excel";
Response.AddHeader("Content-Disposition", "attachment; filename=LabelExcel"+Time+".xls");
Response.BinaryWrite(stream.ToArray());
Response.Flush();
Response.End();
}
這是代碼