本文介绍了导出gridview后,删除excel标头中的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请帮助我如何删除excel标头中的图像.我使用gridview作为源数据使用export命令生成了excel.这是我的代码
Kindly help me on how to remove image in my excel header. I generate the excel using export command using gridview as source data. Here is my code
Response.AddHeader("content-disposition", "attachment;filename=" & strFilename & ".xls") Response.Clear() Response.Charset = "" Response.ContentType = "application/vnd.xls" Dim sw As System.IO.StringWriter = New System.IO.StringWriter() Dim htw As System.Web.UI.HtmlTextWriter = New System.Web.UI.HtmlTextWriter(sw) grvData.AllowPaging = False grvData.AllowSorting = False PopulateGrid() grvData.RenderControl(htw) Response.Write(sw.ToString) Response.End()一切都已设置-除了我的标头中有一个标头名称空白(因为现在显示的图像)-该图像来自gridview(我使用箭头表示asc和desc)
Everything was set - except that one my header had a blank header name because of the image that was now shown - the image is came from gridview (I''m using arrow for asc and desc)
推荐答案导出之前,隐藏您的HeaderImage 使用visible = false; Before Exporting hide your HeaderImage use visible = false;
更多推荐
导出gridview后,删除excel标头中的图像
发布评论