我在转的过成中,table里的文本是可以转的,但html里的checkbox,radio这些单选和复选筐,空件,转到excel里就不完整了,是乱的.我两中方法转都是的
1.是直接把后缀htm该为slx
2.在程序里写代码
HttpContext.Current.Response.Buffer = true;
        // HttpContext.Current.Response.Charset = "gb2312";
        HttpContext.Current.Response.Charset = "utf-8";
        HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default;        HttpContext.Current.Response.ContentType = "application nd.ms-excel";
        HttpContext.Current.Response.AddHeader("content-disposition:attachment", "inline;filename=" + HttpUtility.UrlEncode("招商银行特约商户开户内部审批表" + ".xls"));

解决方案 »

  1.   

    你想要问什么呢?你要达到什么目的呢?checkbox,radio 隐藏掉的话Excel里面就看不到了。
      

  2.   

    就是我的html里有checkbox,radio这两种空件,把他们转成excel里时,这些空件就是乱的.
    我试过只要是html里的空件转到excel里都是乱的,包括textBox文本空件。
    但是表格里的纯文字就没有问题
      

  3.   

    以文本方式输出文件,表格之间用,隔开,后改扩展名为cvs