The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Export to Excel
krish
post Sep 28 2006, 08:53 AM
Post #1


Newbie
*

Group: Members
Posts: 10
Joined: 27-September 06
Member No.: 244



hi!

Plz help me


I'm using a datagrid.In that in one column I'm having images.When I export to excel file and opened it
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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Brian Chandler
post Sep 29 2006, 03:41 AM
Post #2


Jocular coder
********

Group: Members
Posts: 2,460
Joined: 31-August 06
Member No.: 43



What is a "datagrid"?

How does this relate to Databases (in the context of web publishing) or Server-side scripting (the other forum you posted to)?

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 11:59 AM