我如何将网页中的内容下载到电子表格下面是我的代码,它只下载excel表数据,但它不下载网页中的其他内容如何下载完整的网页数据
protected void BtnSave_Click(object sender, EventArgs e)
{
Response.ClearContent();
Response.AddHeader("content-disposition", "attachment; filename=Details.ods");
Response.ContentType = "vnd.oasis.opendocument.text";
System.IO.StringWriter sw = new System.IO.StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
GridView1.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
}
public override void VerifyRenderingInServerForm(Control control)
{
}
}
答案 0 :(得分:0)
替换
<br>
带
<br/>