0
請幫助我如何刪除excel標題中的圖像。我生成使用export命令使用的GridView作爲源數據在導出gidview後在excel標題中刪除圖像
這裏是我的代碼
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()
Excel的
一切都被設置-except一個我的頭有,因爲這是現在顯示的圖像的空白頭名 - 圖像來自gridview(我正在使用箭頭asc和desc) - 對不起,我現在不能在這裏發佈任何圖像
目前還不清楚(對我而言)你想要什麼。你想在Excel中顯示圖像還是你想隱藏它?你知道你並不是真的生成一個excel文件,而只是帶有xls擴展名的HTML,它可以正確處理excel。 –