Asp.net中能不能调用Word,例如:打开一个模板文件对其进行,文字,图片,表格的插入等... Asp.net中能不能调用Word,例如:打开一个模板文件对其进行,文字,图片,表格的插入等... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 可以的,引用word对象,还要用dcomcfg 调整 aspnet用户的权限用dcomcfg 调整 aspnet用户的权限具体看 http://support.microsoft.com/default.aspx?scid=kb;zh-cn;288366 你的word是要求在网页里面打开还是直接用word调用,如果是直接调用,我这里倒是有代码string sql="select st_nr from stid1 where st_id=1"; SqlConnection connection = new SqlConnection("Server=.;uid=sa;pwd=sa;Database=tksqldb_train"); SqlCommand command = new SqlCommand(sql, connection); connection.Open(); SqlDataReader dr = command.ExecuteReader(); if(dr.Read()) { Response.Clear(); Response.AddHeader("Content-Type","application/msword"); Response.BinaryWrite((byte[])dr["st_nr"]); } dr.Close(); connection.Close();这个是从数据库binary字段中读出来然后用ie打开的 读取文件时,怎么只取. 前面的,就是不要扩展名… 如何用DataList让不同的背景交互显示? 动态生成treeveiw的节点。要生成5级的树, ASP.net(C#)中如何检测字符串A中是否包含字符串B? 做的论坛出现了这样的问题,在线人数不匹配和无法登录注册的问题? 如何用javascript获取鼠标选取的行 再开一贴 设计新闻系统中遇到的一个小问题 checkbox问题? Java Script中客户端日期如何验证?急!万分感谢! 水晶报表超链接问题 一个html控件的javascript事件在 firefox火狐浏览器下出现异常!!!!!!
具体看 http://support.microsoft.com/default.aspx?scid=kb;zh-cn;288366
string sql="select st_nr from stid1 where st_id=1";
SqlConnection connection = new SqlConnection("Server=.;uid=sa;pwd=sa;Database=tksqldb_train");
SqlCommand command = new SqlCommand(sql, connection);
connection.Open();
SqlDataReader dr = command.ExecuteReader();
if(dr.Read())
{
Response.Clear();
Response.AddHeader("Content-Type","application/msword");
Response.BinaryWrite((byte[])dr["st_nr"]);
}
dr.Close();
connection.Close();
这个是从数据库binary字段中读出来然后用ie打开的