Problem in exporting Chart to excel
<p>I have dynamically created table in which some data rows and one MS Chart is there.
How can I send that table to excel including chart .</p>

<p>I am using the fallowing code to export but it unable to render chart.</p>

<pre><code> protected void btnGetExcelReport_Click(object sender, EventArgs e)
    {

        Table tblDealsRep = new Table();
        tblDealsRep = (Table)Session["tblReport"];
        if (tblDealsRep.Rows.Count &gt; 0)
        {
            Response.Clear();
            Response.AddHeader("content-disposition", "attachment;filename=LeadsReport.xls");
            Response.ContentType = "application/ms-excel";
            string k = GetGridViewHtml(tblDealsRep);
            Response.Write(k);
            Response.End();
        }
    }

    public string GetGridViewHtml(Control c)
    {
        System.IO.StringWriter sw = new System.IO.StringWriter();
        HtmlTextWriter hw = new HtmlTextWriter(sw);
            c.RenderControl(hw);
        return sw.ToString();

    }
</code></pre>
