473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Image export

In this popular code to extract to Excel from Datagrid, canybody tell
me how to export an Image along with the remaining text.

Thanks
K
Response.Clear();

Response.AddHeader("content-disposition",
"attachment;filename=FileName.xls");

Response.Charset = "";

// Comment out the line below
// Response.Cache.SetCacheability(HttpCacheability.No Cache);

Response.ContentType = "application/vnd.xls";

System.IO.StringWriter stringWrite = new System.IO.StringWriter();

System.Web.UI.HtmlTextWriter htmlWrite = new
HtmlTextWriter(stringWrite);

myDataGrid.RenderControl(htmlWrite);

Response.Write(stringWrite.ToString());

Response.End();

Oct 2 '06 #1
0 944

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Steve Holden | last post by:
Does anyone know the workaround for this error, encountered when trying to build PIL 1.1.4 from source under cygwin (Python 2.3.3)? running build_ext building '_imaging' extension gcc...
3
by: Tom John | last post by:
Hi I am using Office Web Components to generate a GIF image, which i want to display in a picture box. However i am having a problem when i attempt to load the image into the picture box....
0
by: Sridhar | last post by:
Hi, I have a export to excel function where it exports the data of a datagrid into the excel sheet. For this, I am using the button and the text on that button reads "Export to Excel". Instead...
2
by: wubin_98 | last post by:
Hi, I want to export a gridview data and a image from image control to export to an Excel document. When I executed following code, GridView data was exported to Excel properly. But no image...
1
by: manmit.walia | last post by:
Hello All, I am stuck on a task that I need to complete. What I have is a SQL 2005 DB running with a Table called Docs. The table structure consists of the following: Table Structure for Docs...
0
by: chithrausha | last post by:
Iam having an HTML file where in iam writing some text and it has some background image embedded in it.i want to convert that html file to image file and want to export it in pdf format.(without...
3
by: helraizer1 | last post by:
Hey folks, I have made an image-based shoutbox and now users can view older and newer message on the shoutbox depending on the $_GET - pagination - that works. However, since it's image based and...
1
by: stuart | last post by:
We have a forms application that captures comments digitally entered by an inspector and saved as an image in Sql Server. The manager of this inspector wants to be able to transfer the data in Sql...
0
by: getpunith | last post by:
Hi all, How can export or insert an Image to MS WORD 2007. Doc.InlineShapes.AddPicture() needs an Image file stored on disk space, But I dont have Image file.What I have is an Image object. ...
12
by: lawpoop | last post by:
I'm developing a php website that I have under subversion version control. I'm working on an image upload functionality, and in the middle of it I realized that any files that a user uploads will...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.