在Asp.net中导出Gridview来优化数据表

我有一个.net网格需要被导出到excel / datable。问题是它包含文本框+下拉菜单。 这不适用于下拉菜单

public void Persist(object sender, EventArgs e) { // GridViewExportUtil.Export("Customers.xls", this.grdData); DataTable dt = new DataTable(); // add the columns to the datatable if (grdData.HeaderRow != null) { for (int i = 0; i < grdData.HeaderRow.Cells.Count; i++) { dt.Columns.Add(grdData.HeaderRow.Cells[i].Text); } } // add each of the data rows to the table foreach (GridViewRow row in grdData.Rows) { DataRow dr; dr = dt.NewRow(); for (int i = 0; i < row.Cells.Count; i++) { dr[i] = row.Cells[i].Text.ToString(); } dt.Rows.Add(dr); } 

[1]:https://i.stack.imgur.c