添加引用Microsoft Office Excel:
添加引用Microsoft Office Excel:
1
using Excel = Microsoft.Office.Interop.Excel;
方法
1
#endregion
调用
1 private void btnExcel_Click(object sender,EventArgs e)
{
if (!oper.ExportDataGridview(dgvEquiment, true))
2 MessageBox.Show("表格中没有数据,无法导出数据!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
1
using Excel = Microsoft.Office.Interop.Excel;
方法
1
#endregion
调用
1 private void btnExcel_Click(object sender,EventArgs e)
{
if (!oper.ExportDataGridview(dgvEquiment, true))
2 MessageBox.Show("表格中没有数据,无法导出数据!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}