private void ExportTableExcel() { GV.PageSize = 10000; initData(true); GridViewExport gvx = new GridViewExport("MaintHelpDesk_Search.XLS", GV); Response.End(); }
private async void ExportGridViewData() { GridViewExport.ExportFormat exportFormat = GridViewExport.ExportFormat.EXCEL; Enum.TryParse(tool_exportCondition.Text, out exportFormat); var desPath = ExportDesFilePath(exportFormat); this.tool_export.Enabled = false; DataTable dt = null; if (this.radDock1.ActiveWindow == this.tool_logData) { //GridViewExport.ExportGridViewData(exportFormat, this.radGridView1); await Task.Run(() => { dt = QueryAllLogdetail(); }); } else if (this.radDock1.ActiveWindow == this.tool_specCfg) { //GridViewExport.ExportGridViewData(exportFormat, this.gridSpec); await Task.Run(() => { dt = QueryAllLimitConfig(); }); } else if (this.radDock1.ActiveWindow == this.tool_programv) { //GridViewExport.ExportGridViewData(exportFormat, this.gridProgrameVersion); await Task.Run(() => { dt = QueryAllTestPramVersion(); }); } if (!GridViewExport.ImportToCSV(dt, desPath)) { return; } //export data complete MessageBox.Show("导出完成!", "提示", MessageBoxButtons.OK); this.tool_export.Enabled = true; }
protected void btnExport_Click(object sender, EventArgs e) { string str = ""; string strParameter = ""; GridViewExport objExport = new GridViewExport(); strParameter = strParameter + getchkList(chkModelCodeList, "Model"); strParameter = strParameter + getchkList(chkCategory, "Category"); strParameter = strParameter + getchkList(chkClutchType, "ClutchType"); strParameter = strParameter + getchkList(chkSpecialList, "Special"); str = str + "<table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr><td style='font-size:small;font-weight:bold;'>Report For:</td><td style='font-size:small;font-weight:bold;'>Budget Report</td></tr>"; str = str + "</table>"; str = str + strParameter; str = str + "<br/><table width='50%' border='1' cellpadding='0' cellspacing='0'>"; if (rdoData.SelectedValue == "0") { str = str + "<tr><td style='font-size:small;font-weight:bold;'>" + rdoData.SelectedItem.Text.ToString() + "</td></tr>"; str = str + "<tr><td >Place:</td>"; if (rdoAlwar.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoAlwar.Text.ToString() + "</td>"; } else if (rdoBhopal.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoBhopal.Text.ToString() + "</td>"; } else if (rdoAllPlace.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoAllPlace.Text.ToString() + "</td>"; } str = str + "</tr>"; } else if (rdoData.SelectedValue == "1") { str = str + "<tr><td style='font-size:small;font-weight:bold;'>" + rdoData.SelectedItem.Text.ToString() + "</td></tr>"; str = str + "<tr><td >Engine:</td>"; if (rdoAlwarEngine.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoAlwarEngine.Text.ToString() + "</td>"; } else if (rdoSimpsonEngine.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoSimpsonEngine.Text.ToString() + "</td>"; } else if (rdoBothEngine.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoBothEngine.Text.ToString() + "</td>"; } str = str + "</tr>"; } else { str = str + "<tr><td style='font-size:small;font-weight:bold;'>" + rdoData.SelectedItem.Text.ToString() + "</td></tr>"; } str = str + "<tr><td >Year:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoYear.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td></tr>"; str = str + "</table><br/>"; hdnExport.Value = str + hdnExport.Value; objExport.ExportGridView(hdnExport.Value); }
private void Menu_export_Click(object sender, EventArgs e) { GridViewExport.ExportFormat exportFormat = GridViewExport.ExportFormat.EXCEL; Enum.TryParse(this.menu_exportCondition.Text, out exportFormat); GridViewExport.ExportGridViewData(exportFormat, this.radGridView1); }
private void Tool_package_export_Click(object sender, EventArgs e) { GridViewExport.ExportFormat exportFormat = GridViewExport.ExportFormat.EXCEL; Enum.TryParse(tool_package_exportFilter.Text, out exportFormat); GridViewExport.ExportGridViewData(exportFormat, radGridViewPackage); }
protected void btnExport_Click(object sender, EventArgs e) { string str = ""; string strParameter = ""; GridViewExport objExport = new GridViewExport(); strParameter = strParameter + getchkList(chkModelCodeList, "Model"); strParameter = strParameter + getchkList(chkCategory, "Category"); strParameter = strParameter + getchkList(chkClutchType, "ClutchType"); strParameter = strParameter + getchkList(chkSpecialList, "Special"); str = str + "<table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr><td style='font-size:small;font-weight:bold;'>Report For:</td><td style='font-size:small;font-weight:bold;'>Failure Per 1000 Tractors</td></tr>"; str = str + "<tr><td style='font-size:small;font-weight:bold;'>" + rdoReportType.SelectedItem.Text.ToString() + "</td></tr>"; str = str + "</table>"; str = str + strParameter; str = str + "<br/><table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr>"; str = str + "<td >Item Group:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpItemGroup.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td></tr>"; str = str + "</table>"; str = str + getchkList(Chkitemlist, "Item"); str = str + "<br/><table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr>"; str = str + "<td >From Month:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpFromMonth.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td>"; str = str + " <td>To Month:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpToMonth.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td>"; str = str + "<tr><td >Problem Type:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoProblemType.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td></tr>"; str = str + "</table><br/>"; hdnExport.Value = str + hdnExport.Value; objExport.ExportGridView(hdnExport.Value); }
protected void btnExport_Click(object sender, EventArgs e) { string str = ""; string strParameter = ""; GridViewExport objExport = new GridViewExport(); strParameter = strParameter + getchkList(chkModelCodeList, "Model"); strParameter = strParameter + getchkList(chkCategory, "Category"); strParameter = strParameter + getchkList(chkClutchType, "ClutchType"); strParameter = strParameter + getchkList(chkSpecialList, "Special"); str = str + "<table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr><td style='font-size:small;font-weight:bold;'>Report For:</td><td style='font-size:small;font-weight:bold;'>Sales Summary</td></tr>"; str = str + "</table>"; str = str + strParameter; str = str + "<br/><table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr><td >From Period:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpFromMonth.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpFromYear.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td>"; str = str + " <td>To Period:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpToMonth.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpToYear.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td>"; str = str + "<td >Region:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpRegion.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td></tr>"; str = str + "</table><br/>"; hdnExport.Value = str + hdnExport.Value; //hdnExport.Value = objExport.RemoveComponent("id=ctl00_ContentPlaceHolder1_chk", "checkbox ", hdnExport.Value); objExport.ExportGridView(hdnExport.Value); }
private void Tool_export_Click(object sender, EventArgs e) { GridViewExport.ExportGridViewData(GridViewExport.ExportFormat.EXCEL, this.radGridView1); }
protected void btnExport_Click(object sender, EventArgs e) { ExcelSheet excel = new ExcelSheet { fileName = "example_gridview", grids = new List <Grid> { new Grid() { tableName = "User Data", gridView = gvUsers, headerForeColor = "#333", headerBackgroundColor = "#777", borderColor = "#000000", borderWidthInPixel = 1, footerForeColor = "#777", footerBackgroundColor = "#333", columnsConfiguration = new List <ColumnModel> { new ColumnModel() { headerText = "User ID", isHidden = false }, new ColumnModel() { headerText = "User Name", isHidden = false }, new ColumnModel() { headerText = "Age", isHidden = true }, new ColumnModel() { headerText = "Date Of Birth", isHidden = false }, new ColumnModel() { headerText = "Salary ($)", isHidden = false } } }, new Grid() { tableName = "Game Data", gridView = gvGames, headerForeColor = "#FFFFFF", headerBackgroundColor = "#000000", borderColor = "#000000", borderWidthInPixel = 1, footerForeColor = "#FFFFFF", footerBackgroundColor = "#000000", columnsConfiguration = new List <ColumnModel> { new ColumnModel() { headerText = "Game ID", isHidden = false }, new ColumnModel() { headerText = "Game Name", isHidden = false }, new ColumnModel() { headerText = "Is Popular Game?", isHidden = true } } } } }; if (excel != null) { GridViewExport.Export(excel); } }
/*******************************Exporting Record Into Excel*****************************************/ protected void Button1_Click(object sender, EventArgs e) { GridViewExport objExport = new GridViewExport(); //objExport.ExportGridView(hdnExport.Value); grdacrData.ShowFooter = false; grdacrData.AllowPaging = false; grdacrData.AllowSorting = false; strGroup = "Model"; grdacrData.Visible = true; grdacrData.PageIndex = 0; grdacrData.DataSource = dtGridData; helper = new GridViewHelper(this.grdacrData, false); string[] cols = new string[1]; cols[0] = strGroup; helper.RegisterGroup(cols, true, true); helper.GroupHeader += new GroupEvent(helper_GroupHeader); helper.RegisterSummary("Value", SummaryOperation.Sum, strGroup); helper.RegisterSummary("Quantity", SummaryOperation.Sum, strGroup); helper.GroupSummary += new GroupEvent(helper_GroupSummary); grdacrData.DataBind(); PrepareGridViewForExport(grdacrData); ExportGridView(); }
protected void btnExport_Click(object sender, EventArgs e) { string str = ""; string strParameter = ""; GridViewExport objExport = new GridViewExport(); strParameter = strParameter + getchkList(chkModelCodeList, "Model"); strParameter = strParameter + getchkList(chkCategory, "Category"); strParameter = strParameter + getchkList(chkClutchType, "ClutchType"); strParameter = strParameter + getchkList(chkSpecialList, "Special"); strParameter = strParameter + getchkList(chkRegion, "Region"); str = str + "<table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr><td style='font-size:small;font-weight:bold;'>Report For:</td><td style='font-size:small;font-weight:bold;'> Tractor Under Warranty</td></tr>"; str = str + "</table>"; str = str + strParameter; str = str + "<br/><table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr><td >From Period:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpFromMonth.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpFromYear.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td>"; str = str + " <td>To Period:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpToMonth.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + drpToYear.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td></tr>"; str = str + "</table><br/>"; hdnExport.Value = str + hdnExport.Value; objExport.ExportGridView(hdnExport.Value); }
protected void Button1_Click(object sender, EventArgs e) { GridViewExport objExport = new GridViewExport(); hdnExport.Value = strValue + hdnExport.Value; objExport.ExportGridView(hdnExport.Value); }
private void ExportGridViewData(string exportCondition, RadGridView radGridView) { GridViewExport.ExportFormat exportFormat = GridViewExport.ExportFormat.EXCEL; Enum.TryParse(exportCondition, out exportFormat); GridViewExport.ExportGridViewData(exportFormat, radGridView); }
/*******************************Exporting Record Into Excel*****************************************/ protected void Button1_Click(object sender, EventArgs e) { string str = ""; string strParameter = ""; GridViewExport objExport = new GridViewExport(); strParameter = getchkList(chkDefectCode, "GroupName"); str = str + "<table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr><td style='font-size:small;font-weight:bold;'>Report For:</td><td style='font-size:small;font-weight:bold;'>Defect Group Wise ACR Detail</td></tr>"; str = str + "<tr><td >Item Group:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + strParameter + "</td></tr>"; str = str + "<tr><td >From Date:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + txtFromDate.Text.ToString() + "</td>"; //str = str + "<td style='font-size:small;font-weight:bold;'>" + drpFromYear.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td>"; str = str + " <td>To Date:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + txtToDate.Text.ToString() + "</td></tr>"; //str = str + "<td style='font-size:small;font-weight:bold;'>" + drpToYear.SelectedItem.Text.ToString().Replace("Select All", "All") + "</td>"; if (rdoData.SelectedValue == "0") { str = str + "<tr><td style='font-size:small;font-weight:bold;'>" + rdoData.SelectedItem.Text.ToString() + "</td></tr>"; str = str + "<tr><td >Place:</td>"; if (rdoAlwar.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoAlwar.Text.ToString() + "</td>"; } else if (rdoBhopal.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoBhopal.Text.ToString() + "</td>"; } else if (rdoAllPlace.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoAllPlace.Text.ToString() + "</td>"; } str = str + "</tr>"; } else if (rdoData.SelectedValue == "1") { str = str + "<tr><td style='font-size:small;font-weight:bold;'>" + rdoData.SelectedItem.Text.ToString() + "</td></tr>"; str = str + "<tr><td >Engine:</td>"; if (rdoAlwarEngine.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoAlwarEngine.Text.ToString() + "</td>"; } else if (rdoSimpsonEngine.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoSimpsonEngine.Text.ToString() + "</td>"; } else if (rdoBothEngine.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoBothEngine.Text.ToString() + "</td>"; } str = str + "</tr>"; } else { str = str + "<tr><td style='font-size:small;font-weight:bold;'>" + rdoData.SelectedItem.Text.ToString() + "</td></tr>"; } str = str + "<tr><td >Problem Type:</td>"; if (rdoPrimary.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoPrimary.Text.ToString() + "</td>"; } else if (rdoConsequences.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoConsequences.Text.ToString() + "</td>"; } else if (rdoAllProblem.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoAllProblem.Text.ToString() + "</td>"; } str = str + "<td >Year:</td>"; if (rdoFirst.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoFirst.Text.ToString() + "</td>"; } else if (rdoSecond.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoSecond.Text.ToString() + "</td>"; } else if (rdoBothYear.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoBothYear.Text.ToString() + "</td></tr>"; } str = str + "</table><br/>"; hdnExport.Value = str + hdnExport.Value; objExport.ExportGridView(hdnExport.Value); }
/*******************************Exporting Record Into Excel*****************************************/ protected void Button1_Click(object sender, EventArgs e) { string str = ""; string strParameter = ""; GridViewExport objExport = new GridViewExport(); str = str + "<table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr><td style='font-size:small;font-weight:bold;'>Report For:</td><td style='font-size:small;font-weight:bold;'>Chassis Wise ACR Detail</td></tr>"; str = str + "<tr><td > Chassis:</td>"; str = str + "<td style='font-size:small;font-weight:bold;'>" + txtChassisNo.Text.ToString() + "</td></tr>"; if (rdoData.SelectedValue == "0") { str = str + "<tr><td style='font-size:small;font-weight:bold;'>" + rdoData.SelectedItem.Text.ToString() + "</td></tr>"; str = str + "<tr><td >Place:</td>"; if (rdoAlwar.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoAlwar.Text.ToString() + "</td>"; } else if (rdoBhopal.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoBhopal.Text.ToString() + "</td>"; } else if (rdoAllPlace.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoAllPlace.Text.ToString() + "</td>"; } str = str + "</tr>"; } else if (rdoData.SelectedValue == "1") { str = str + "<tr><td style='font-size:small;font-weight:bold;'>" + rdoData.SelectedItem.Text.ToString() + "</td></tr>"; str = str + "<tr><td >Engine:</td>"; if (rdoAlwarEngine.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoAlwarEngine.Text.ToString() + "</td>"; } else if (rdoSimpsonEngine.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoSimpsonEngine.Text.ToString() + "</td>"; } else if (rdoBothEngine.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoBothEngine.Text.ToString() + "</td>"; } str = str + "</tr>"; } else { str = str + "<tr><td style='font-size:small;font-weight:bold;'>" + rdoData.SelectedItem.Text.ToString() + "</td></tr>"; } str = str + "<tr><td >Problem Type:</td>"; if (rdoPrimary.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoPrimary.Text.ToString() + "</td>"; } else if (rdoConsequences.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoConsequences.Text.ToString() + "</td>"; } else if (rdoAllProblem.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoAllProblem.Text.ToString() + "</td>"; } str = str + "<td >Year:</td>"; if (rdoFirst.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoFirst.Text.ToString() + "</td>"; } else if (rdoSecond.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoSecond.Text.ToString() + "</td>"; } else if (rdoBothYear.Checked) { str = str + "<td style='font-size:small;font-weight:bold;'>" + rdoBothYear.Text.ToString() + "</td></tr>"; } str = str + "</table><br/>"; hdnExport.Value = str + hdnExport.Value; objExport.ExportGridView(hdnExport.Value); }
private void Tool_sn_export_Click(object sender, EventArgs e) { GridViewExport.ExportFormat exportFormat = GridViewExport.ExportFormat.EXCEL; Enum.TryParse(this.tool_exportFilter.Text, out exportFormat); GridViewExport.ExportGridViewData(exportFormat, this.radGridView1); }
protected void btnExport_Click(object sender, EventArgs e) { string str = ""; string strParameter = ""; GridViewExport objExport = new GridViewExport(); strParameter = strParameter + getchkList(chkModelCodeList, "Model"); strParameter = strParameter + getchkList(chkCategory, "Category"); strParameter = strParameter + getchkList(chkClutchType, "ClutchType"); strParameter = strParameter + getchkList(chkSpecialList, "Special"); str = str + "<table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr><td style='font-size:small;font-weight:bold;'>Report For:</td><td style='font-size:small;font-weight:bold;'>Production</td></tr>"; str = str + "</table><br/>"; str = str + strParameter; hdnExport.Value = str + hdnExport.Value; objExport.ExportGridView(hdnExport.Value); }
protected void btnExport_Click(object sender, EventArgs e) { GridViewExport objExport = new GridViewExport(); objExport.ExportGridView(hdnExport.Value); }
protected void btnExport_Click(object sender, EventArgs e) { string str = ""; string strParameter = ""; GridViewExport objExport = new GridViewExport(); strParameter = strParameter + getchkList(chkModelCodeList, "Model"); strParameter = strParameter + getchkList(chkCategory, "Category"); strParameter = strParameter + getchkList(chkClutchType, "ClutchType"); strParameter = strParameter + getchkList(chkSpecialList, "Special"); str = str + "<table width='50%' border='1' cellpadding='0' cellspacing='0'>"; str = str + "<tr><td style='font-size:small;font-weight:bold;'>Report For:</td><td style='font-size:small;font-weight:bold;'>Sales</td></tr>"; str = str + "</table><br/>"; str = str + strParameter; hdnExport.Value = str + hdnExport.Value; //hdnExport.Value = objExport.RemoveComponent("id=ctl00_ContentPlaceHolder1_chk", "checkbox ", hdnExport.Value); objExport.ExportGridView(hdnExport.Value); }