我想将asp.net中的gridview导出为excel但排除页脚行。我怎样才能做到这一点?
答案 0 :(得分:1)
您可以在导出时隐藏它:
myFiles.FooterRow.Visible = false;
这样的事情: -
private void ExportGridView()
{
System.IO.StringWriter sw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
myFiles.FooterRow.Visible = false;
//.........
}