dateset数据如何导入WORD请大家指点 如题!应该如何导入到WORD 呢? 大家给我指点下!迷茫中! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.cnblogs.com/chaodongwang/archive/2007/07/29/835257.html里面有 谢谢楼上的是VB的!我看不太懂!谁能提供C#的资料啊!谢谢了 网上有很多,自己研究下:http://www.cnblogs.com/dragon-china/archive/2007/04/03/698371.html还可以用StringWriter结合Response来写数据。 public void myToExcel(System.Web.UI.Control ctl,string filename) {// HttpContext.Current.Response.AppendHeader("Content-Disposition","attachment;filename=Excel.xls"); HttpContext.Current.Response.AppendHeader("Content-Disposition","attachment;filename="+filename+".xls"); HttpContext.Current.Response.Charset ="UTF-8"; HttpContext.Current.Response.ContentEncoding =System.Text.Encoding.UTF8; HttpContext.Current.Response.ContentType ="application/ms-excel";//image/JPEG;text/HTML;image/GIF;vnd.ms-excel/msword; System.IO.StringWriter tw = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw); ctl.RenderControl(hw); HttpContext.Current.Response.Write(tw.ToString()); HttpContext.Current.Response.End(); } 和导出到excel差不多的把using 了 word的引用会有很详细的API的 导到xml好了,DataSet提供WriteXml函数的 怎么样让MDI子窗体的显示大小互不影响? 添加了几个私有字体,为什么没有效果呢?? 新版asp.net 2.0 beta 2技术实战,散分了。 关于文字链接的一个问题!大侠们都来看看啊! 关于word中域的值的取出的和修改 [50分相送!]谁能提供C#中进程间进行通信的资料或者例子? newredhat进来给你分 WCF,到底有哪些地方用得上 请高手帮我看看,给我答复!!! 请回答这个不难的问题,再加100分!!!!(总共200分了) 通过C#将SqlServer中存储过程查询出的结果到出到Excel??? 初学者问一下Finalize()方法的问题
http://www.cnblogs.com/dragon-china/archive/2007/04/03/698371.html
还可以用StringWriter结合Response来写数据。
{
// HttpContext.Current.Response.AppendHeader("Content-Disposition","attachment;filename=Excel.xls");
HttpContext.Current.Response.AppendHeader("Content-Disposition","attachment;filename="+filename+".xls");
HttpContext.Current.Response.Charset ="UTF-8";
HttpContext.Current.Response.ContentEncoding =System.Text.Encoding.UTF8;
HttpContext.Current.Response.ContentType ="application/ms-excel";//image/JPEG;text/HTML;image/GIF;vnd.ms-excel/msword;
System.IO.StringWriter tw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
ctl.RenderControl(hw);
HttpContext.Current.Response.Write(tw.ToString());
HttpContext.Current.Response.End();
}
using 了 word的引用会有很详细的API的