我们如何将完整的网页数据下载到电子表格中

时间:2016-08-02 00:39:17

标签: c# asp.net openoffice-calc

我如何将网页中的内容下载到电子表格下面是我的代码,它只下载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)
                {

                }
            }

1 个答案:

答案 0 :(得分:0)

替换

<br>

<br/>