导出gridview后,删除excel标头中的图像

编程入门 行业动态 更新时间:2024-10-25 16:16:49
本文介绍了导出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标头中的图像

本文发布于:2023-11-09 15:58:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572798.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   gridview   excel   标头中

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!