In this post, we want to discuss the way to export image to excel using c# html output. Before we get started, if you want to know about Software Development Life Cycle, please go through the following article: What is SDLC? What is SDLC model overview?

Export data from an asp.net page to an Excel file and I’m basically just outputting HTML to the XLS file where I want to embed an image. The image file has to be in binary form in the content.

I have to get images in StringWriter and use System.Text.Encoding.ASCII.GetBytes(stringwriter string) in an array of bytes. then write these as outputStream.Write(byte_array, 0, byte_array.Length); where outputstream is HttpContext Response outputstream.

How to export image to Excel using the output HTML

The article was published on October 22, 2019 @ 2:27 AM

Leave a Comment