悬赏园豆:30
[已解决问题]
解决于 2008-07-15 13:34
请问我在导出grid数据到excel,怎么把grid上面的01这种数据正常显示出来,现在显示的是1,还有怎么把隐藏的列不让它显示出来,<br>代码如下:<br>private void Export_Click(object sender, System.EventArgs e)<br> {<br> //清除客户端当前显示<br> Response.Clear();<br> //作为附件输出,filename=FileFlow.xls 指定输出文件的名称,注意其扩展名和指定文 件类型相符,可以为:.doc .xls .txt .htm <br> Response.AddHeader("content-disposition", "attachment;filename=FileName.xls"); //显示标头<br> //设置显示的字和内容要存的形式<br> Response.Charset = "UTF-8";<br> Response.ContentType = "application/vnd.xls";<br> System.IO.StringWriter stringWrite = new System.IO.StringWriter();<br> System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);<br> this.btnQuery_Click(this, e);<br> <br> this.uwgResult.UltraWebGridControl.RenderControl(htmlWrite);<br> Response.Write(stringWrite.ToString());<br> Response.End();<br> <br> <br> }<br>