JQ怎么把HTML中的table内的内容导出到excel【急】
JQ怎么把html中的table里的内容导出到excel.
求会的朋友帮忙。。
别复制粘贴网上搜来的,都不好用的。
急、急、急、急
------解决方案-------------------- Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=TongJi" + Common.PublicCommon.returnTime().ToString("yyyy-MM-dd") + ".xls");
Response.Charset = "utf-8";
Response.ContentType = "application/vnd.xls";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
System.Web.UI.HtmlControls.HtmlTable newtable = new HtmlTable();
newtable = (HtmlTable)this.div_tab.FindControl("Table1");
newtable.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();