如何将数据导出到excel2007中 以前做过数据导出到excel2003中,但现在导出到excel2007中出现错误,格式无法识别,请高手指导如何导出到excel2007,直接从数据库导出也可以。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Response.ContentType = "application/vnd.ms-excel"导出数据到excel模板 string path = Server.MapPath("~/") + FilePath; Response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName); if (File.Exists(path)) { Response.ContentType = "application/octet-stream"; Response.WriteFile("" + path + ""); } Response.End(); 应该通过添加引用,添加对EXCEL的支持吧 我也想知道怎样把access 2007怎样导入到数据库去 添加引用吧,记得是 2003 2007 提供的offic开发 dll版本不同 这是什么意思??? 给word文档末尾加了张图片,现在要在此基础上在加东西。会把那张图覆盖了。怎么办。 高分求行转换成列的SQL Asp.net里的Response.Write("")输出javascript脚本的问题 关于生成html后好的 解决方案 请教,如何给饼状图标注百分比? 如何实现网页局部刷新?急!顶者有分,分不够另开 提一个不怎么相关的问题 帮助呀!!这句话对吗? SqlDbType.BigInt和System.Int64怎么进行转换? 关于ASP.NET生成PDF文件 根据ID勾选上treeview的checkbox?
导出数据到excel模板
string path = Server.MapPath("~/") + FilePath;
Response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName);
if (File.Exists(path))
{
Response.ContentType = "application/octet-stream";
Response.WriteFile("" + path + "");
}
Response.End();