DataGridView导出成excel实例
摘要:
public void ExportExcel(object Sender, EventArgs e) { DataGridView dt = this.dataGridView1; if (dt.Rows.Count == 0) { MessageBox.Show("没有数据可供导出,请先抓去数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } else { SaveFileDialog saveFileDialog2 = new SaveFileDialog( 阅读全文
posted @ 2011-08-23 14:10 lijinchang 阅读(214) 评论(0) 推荐(0) 编辑