添加引用Microsoft Office Excel:
1C#将DataGridView中的数据导出为EXCELusing Excel = Microsoft.Office.Interop.Excel;
方法
 1#endregion
调用

1 private void btnExcel_Click(object sender,EventArgs e)

{C#将DataGridView中的数据导出为EXCEL

if (!oper.ExportDataGridview(dgvEquiment, true))
2C#将DataGridView中的数据导出为EXCEL                MessageBox.Show("表格中没有数据,无法导出数据!""系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

}

添加引用Microsoft Office Excel:
1C#将DataGridView中的数据导出为EXCELusing Excel = Microsoft.Office.Interop.Excel;
方法
 1#endregion
调用

1 private void btnExcel_Click(object sender,EventArgs e)

{C#将DataGridView中的数据导出为EXCEL

if (!oper.ExportDataGridview(dgvEquiment, true))
2C#将DataGridView中的数据导出为EXCEL                MessageBox.Show("表格中没有数据,无法导出数据!""系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

}

相关文章:

  • 2021-12-14
  • 2021-11-26
  • 2021-12-31
  • 2021-09-10
  • 2021-05-18
  • 2021-06-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案