How To export datagrid with images to excel

G

Guest

The datagrid is exporting but without the images. When the file is
downloaded, it seems that the excel file was supposed to have the images
because they appear as "broken" image in the file.

This is the abbreviated approach that I am currently using.

Response.Clear()
Response.Buffer = True
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
Me.EnableViewState = False

Dim oStringWriter As New System.IO.StringWriter()
Dim oHtmlTextWriter As New System.Web.UI.HtmlTextWriter(oStringWriter)

datagrid.RenderControl(oHtmlTextWriter)

Response.Write(oStringWriter.ToString())

Response.End()

How can I get the images to be included in the exported file?

Thanks
 
Joined
Jul 20, 2006
Messages
1
Reaction score
0
Same Problem

Hi all
I am facing a new problem regarding Excel
I am Exporting DataGrid to Excel but the problem is data is coming without images!!! i want to export datagrid with images. is there any way to solve this problem.
thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top