Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was looking to export excel using XML. But didn't able to figure out how to add an image. By creating the XML in C# from back end I am exporting the excel. Can any please suggest any links or the way to do so.

Thanks.
Posted

1 solution

Hi, Just convert your image as byte stream and save it in xml file, while exporting to excel just convert this byte stream into image.
 
Share this answer
 
v2
Comments
Arkadeep De 4-Nov-15 6:25am    
Hi Karthikeyan,
I did like this

sw.Write("<worksheet ss:name="\"S1\"">\r\n<Table>\r\n<row><cell><![CDATA[Tiger<img src=http://www.tycsoftware.com/Imagenes/noticias/Imahe2.jpg>]]>\r\n</Table>\r\n");

its getting error while open the excel file on formatting. Can you please look into this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900