1

ASP.NETサイトで、GridViewコントロールをレンダリングして、その詳細をExcelファイルにエクスポートしています。

Response.ContentType = "application/vnd.ms-excel"
Response.AppendHeader("Content-Type", "application/vnd.ms-excel")
Dim stringWrite As System.IO.StringWriter = New System.IO.StringWriter
Dim htmlWrite As System.Web.UI.HtmlTextWriter = New HtmlTextWriter(stringWrite)
gridviewObject.RenderControl(htmlWrite)
Response.Write(stringWrite.ToString())
Response.End()

現在、レンダリングされていますが、gridviewはデータを美化するためにいくつかの画像を使用しています。データをエクスポートしている間、Excelで画像を表示したくありません。だから私はタグを見つけて、それを空白の文字列に置き換えたいと思います。

誰かが私にそれを行う方法を教えてもらえますか?

4

0 に答える 0