如题!应该如何导入到WORD 呢?
       大家给我指点下!迷茫中!
     

解决方案 »

  1.   

    http://www.cnblogs.com/chaodongwang/archive/2007/07/29/835257.html里面有
      

  2.   

    谢谢楼上的是VB的!我看不太懂!谁能提供C#的资料啊!谢谢了
      

  3.   

    网上有很多,自己研究下:
    http://www.cnblogs.com/dragon-china/archive/2007/04/03/698371.html
    还可以用StringWriter结合Response来写数据。
      

  4.   

    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();
    }
      

  5.   

    和导出到excel差不多的把
    using 了 word的引用会有很详细的API的
      

  6.   

    导到xml好了,DataSet提供WriteXml函数的