gridviw data export to excel and save as zip format?? urgent!!!
-
hello, how to gridview data export to excel and it should save as zip file?? plz give me complete source code?? its urgent... chotachetan
-
hello, how to gridview data export to excel and it should save as zip file?? plz give me complete source code?? its urgent... chotachetan
Take one image..on clcik of tht right following code its save gridview data as .xls not in zip file protected void imgBtnExport_Click(object sender, ImageClickEventArgs e) { System.IO.StringWriter stringWrite = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(stringWrite); try { DateTime dtFromDate, dtToDate; dtFromDate = Convert.ToDateTime(txtFromDate.Text); dtToDate = Convert.ToDateTime(txtToDate.Text); Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=ExcelName.xls"); Response.Charset = ""; // If you want the option to open the Excel file without saving then // comment out the line below Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache); Response.ContentType = "application/vnd.xls"; this.EnableViewState = false; GridView grdExp = new GridView(); grdExp.AllowPaging = false; grdExp.AllowSorting = false; DataSet dsRawProd = objReportBL.GetRawProductivityData(dtFromDate.ToShortDateString(), dtToDate.ToShortDateString(), 0, 0); if (dsRawProd.Tables.Count > 0 && dsRawProd.Tables[0].Rows.Count > 0) { DataTable dtRowPrd = dsRawProd.Tables[0]; DataView dv = new DataView(dtRowPrd); grdExp.DataSource = dv; grdExp.DataBind(); //grdExp.Columns. grdExp.RenderControl(htmlWrite); } } catch (Exception) { } Response.Write(stringWrite.ToString()); Response.End(); }
-
Take one image..on clcik of tht right following code its save gridview data as .xls not in zip file protected void imgBtnExport_Click(object sender, ImageClickEventArgs e) { System.IO.StringWriter stringWrite = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(stringWrite); try { DateTime dtFromDate, dtToDate; dtFromDate = Convert.ToDateTime(txtFromDate.Text); dtToDate = Convert.ToDateTime(txtToDate.Text); Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=ExcelName.xls"); Response.Charset = ""; // If you want the option to open the Excel file without saving then // comment out the line below Response.Cache.SetCacheability(System.Web.HttpCacheability.NoCache); Response.ContentType = "application/vnd.xls"; this.EnableViewState = false; GridView grdExp = new GridView(); grdExp.AllowPaging = false; grdExp.AllowSorting = false; DataSet dsRawProd = objReportBL.GetRawProductivityData(dtFromDate.ToShortDateString(), dtToDate.ToShortDateString(), 0, 0); if (dsRawProd.Tables.Count > 0 && dsRawProd.Tables[0].Rows.Count > 0) { DataTable dtRowPrd = dsRawProd.Tables[0]; DataView dv = new DataView(dtRowPrd); grdExp.DataSource = dv; grdExp.DataBind(); //grdExp.Columns. grdExp.RenderControl(htmlWrite); } } catch (Exception) { } Response.Write(stringWrite.ToString()); Response.End(); }
But i want i should save as zip format... it should be save as zip format omly...
-
hello, how to gridview data export to excel and it should save as zip file?? plz give me complete source code?? its urgent... chotachetan
anujchetan wrote:
plz give me complete source code??
that would cost you One Lakh Crore
Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]