乔山办公网我们一直在努力
您的位置:乔山办公网 > excel表格制作 > <em>asp.net</em>实现office在线预览功能-asp.net excel控件,网

<em>asp.net</em>实现office在线预览功能-asp.net excel控件,网

作者:乔山办公网日期:

返回目录:excel表格制作


别忘了启用宏



这个可以写段代码把EXCEL和WORD转换成HTML网页,然后再显示,网上有很多代码的,你搜索一下。
你看看能不能帮到你
http://hi.baidu.com/feiyu424/item/ea7927c2c647f221ee466596

http://www.cnblogs.com/tangbinblog/archive/2012/11/29/2794110.html
string fileName = "201096218686";
string p = "201096198974.pdf";//定义文件名
string filePath = Server.MapPath("DataFile/" + p);//转换为物理路径
Response.ClearContent();//清空缓冲区内容
Response.ClearHeaders();//清空缓冲区HTTP头
string FilePost = filePath.Substring(filePath.Length - 3).ToLower();//取扩展名
switch (FilePost)
{
case "pdf"://PDF文件
Response.ContentType = "application/PDF";//设置HTTP头为PDF文档其它类似
break;
case "doc":
Response.ContentType = "application/msword";
break;
case "xls":
Response.ContentType = "application/vnd.ms-excel";
break;
default:
Session["ErrorInfo"] = "不支持的e68a84e8a2ade79fa5e98193334文件格式:" + FilePost;
Response.Redirect("ErrorPage.aspx");
break;
}
Response.WriteFile(filePath);//写入客户端
Response.Flush();//客户更新
Response.Close();//写入关闭
Session.Remove("Report");//移除"Report"Session
来源http://

Excel其实也是一个数据库,和平常一样绑定控件一样,就行了,只是,操作Excel文件需要特殊的数据库链接字符串,链接数据库对象一般用这个OleDbConnection,就行了

相关阅读

关键词不能为空
极力推荐

ppt怎么做_excel表格制作_office365_word文档_365办公网