How to export image to excel sheet. [Resolved]

Posted by Allemahesh under ASP.NET on 5/15/2014 | Points: 10 | Views : 1311 | Status : [Member] [MVP] | Replies : 2
I have images and I need to export these images to excel sheet.
How to do this.




Responses

Posted by: Allemahesh on: 5/19/2014 [Member] [MVP] Silver | Points: 25

Up
0
Down

Resolved
I got the below code:-

string attachment = "attachment; filename=" + strFileName;
Response.Clear();
Response.Buffer = true;
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/vnd.ms-excel";
Response.Charset = "";

Response.Write(TopContent.InnerHtml);

StringWriter oStringWriter = new StringWriter();
HtmlTextWriter oHtmlTextWriter = new HtmlTextWriter(oStringWriter);
divExport.RenderControl(oHtmlTextWriter);
Response.Write(oStringWriter.ToString());



Allemahesh, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Goud.Kv on: 5/15/2014 [Member] [MVP] Gold | Points: 25

Up
0
Down
Hi Mahesh.,

Please see the below tutorial, It might helps you.

https://www.youtube.com/watch?v=e1B5g0eFa2g

Thanks & Regards,
Krishna

Allemahesh, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response