Beispiel #1
0
        protected void btnExportToExcel_Click(object sender, EventArgs e)
        {
            SalesRepresentativeReportingChild obj = new SalesRepresentativeReportingChild();
            DataSet ds = obj.GetSKPickingBoard2("Select One", "Select One", "Select One", "Select One", "Select One", "Select One", "Select One");//, "Select One");

            WorkbookEngine we = new WorkbookEngine();

            we.ExportDataSetToExcel(ds.Tables[0], "Sales Representative Reporting");
        }
        protected void btnexcelDownload_Click(object sender, EventArgs e)
        {
            ModalPopupExtender2.Hide();
            BusinessUnitReportingChild obj = new BusinessUnitReportingChild();
            DataSet        ds = obj.GetSKPickingBoard2("Select One", "Select One", "Select One");
            WorkbookEngine we = new WorkbookEngine();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                if (!dr.IsNull("ExpirationDate"))
                {
                    dr.Delete();
                }
                //DateTime expirationDate = Convert.ToDateTime(dr["ExpirationDate"].ToString());
            }
            we.ExportDataSetToExcel(ds.Tables[0], "BusinessUnit Reporting");
        }