asp.net想把带有图片的html表格导出成excel,但是图片导出失败
我想把带有图片的html表格导出成excel,下面这段代码导出文字和表格格式都基本没什么大问题,但是就是表格中的图片导出成excel就无法显示,请问有什么办法吗?求大神!
public void OutPutExcel(string title)
{
Response.Clear();
Response.Buffer = true;
Response.Charset = "utf-8";
Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(title + ".xls"));
Response.ContentEncoding = System.Text.Encoding.GetEncoding("utf-8");
Response.ContentType = "application/ms-excel";
Page.EnableViewState = false;
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
this.Page.RenderControl(oHtmlTextWriter);
string temp = oStringWriter.ToString();
Response.Write(temp);
Response.End();