Embed an image in response to be opened by Excel
<p>I created an HTML table with an image spanning a few cells (first portion) then attempt to export that image to excel (second portion (ExportReport Method)).  I currently have two lines which show the image, both work fine in the HTML table.  The commented out portion shows as a red X when exported to excel, the non-commented out line shows the image in Excel however the image is floating and not cemented into an Excel cell. </p>

<p>I would like to know what I'm missing in order to get the image to show in the Excel export while having that image cemented in a cell (not being able to drag it all over the report.)</p>

<pre><code>//Create Table
Table tbl = new Table();
TableRow tr;
TableCell tc;

tc = new TableCell();
tr = new TableRow();
//tc.Text = "&lt;center&gt;&lt;imj src=\"images/logo_PROD.gif\" alt=\"Logo\" /&gt;&lt;/center&gt;";
tc.Text = "&lt;center&gt;&lt;imj src=\"http://chwf1/portalsite/images/logo_PROD.gif\" alt=\"Logo\" /&gt;&lt;/center&gt;";
tc.ColumnSpan = 3;
tr.Cells.Add(tc);
tbl.Rows.Add(tr);

//Export Table

public static void ExportReport(string fileName, Table table)
    {
        HttpContext.Current.Response.Clear();
        HttpContext.Current.Response.AddHeader(
            "content-disposition", string.Format("attachment; filename={0}", fileName));
        HttpContext.Current.Response.ContentType = "application/ms-excel";

        using (StringWriter sw = new StringWriter())
        {
            using (HtmlTextWriter htw = new HtmlTextWriter(sw))
            {
                table.RenderControl(htw);
                HttpContext.Current.Response.Write(sw.ToString());
                HttpContext.Current.Response.End();
            }
        }
    }
</code></pre>
