asp.net导出Excel打开的时候提示格式与文件扩展名指定的格式不一致

2025-03-20 14:23:20
推荐回答(2个)
回答1:

//删掉
Response.Write("");
//加上这句
 HttpContext.Current.Response.ContentType ="application/ms-excel";

回答2:

你office软件版本低把。你用office2010试试。