Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How To export datagrid with images to excel

Reply
Thread Tools

How To export datagrid with images to excel

 
 
=?Utf-8?B?amhnb256YWxlcw==?=
Guest
Posts: n/a
 
      09-28-2005
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
 
Reply With Quote
 
 
 
 
saquib saquib is offline
Junior Member
Join Date: Jul 2006
Posts: 1
 
      07-20-2006
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Export to Excel (Default File Type - Excel) =?Utf-8?B?SGVtYW50IFNpcGFoaW1hbGFuaQ==?= ASP .Net 15 05-21-2009 12:01 PM
Export to excel in asp.net using excel template Grey ASP .Net 4 10-17-2007 08:08 AM
export images from jsp to excel judiphuongtu@yahoo.com Java 1 03-15-2006 09:33 PM
using Microsoft Excel image for Export to Excel button =?Utf-8?B?U3JpZGhhcg==?= ASP .Net 0 12-09-2005 08:58 PM
Display a Datagrid & Export a Datagrid to Excel Paul D. Fox ASP .Net Datagrid Control 1 07-21-2005 08:38 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57