protected void Export_Button_Click1(object sender, EventArgs e)
    {
        Response.Clear();
        Response.Buffer      = true;
        Response.ContentType = "application/vnd.ms-excel";
        //  Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
        Response.AddHeader("content-disposition", "attachment;filename=BackupFile.xls");
        Response.Charset     = "";
        this.EnableViewState = false;

        System.IO.StringWriter       sw  = new System.IO.StringWriter();
        System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);

        R1.RenderControl(htw);

        Response.Write(sw.ToString());
        Response.End();
    }