点击按钮将gridcontrol内的数据导出excel表格
privatevoidbarButtonItemToExcel_ItemClick(objectsender,DevExpress.XtraBars.ItemClickE...
private void barButtonItemToExcel_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
//MessageBox.Show("请不要更改保存类型", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
SaveFileDialog savDlg = new SaveFileDialog();
savDlg.Filter= "Excel files (*.xlsx)|*.xlsx";//All files (*.*)|*.*|
savDlg.FilterIndex = 2;
if (savDlg.ShowDialog()==System.Windows.Forms.DialogResult.OK)
{
gridControlQALog.ExportToXlsx(savDlg.FileName);
}
Console.Write("pause");
} 展开
{
//MessageBox.Show("请不要更改保存类型", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
SaveFileDialog savDlg = new SaveFileDialog();
savDlg.Filter= "Excel files (*.xlsx)|*.xlsx";//All files (*.*)|*.*|
savDlg.FilterIndex = 2;
if (savDlg.ShowDialog()==System.Windows.Forms.DialogResult.OK)
{
gridControlQALog.ExportToXlsx(savDlg.FileName);
}
Console.Write("pause");
} 展开
1个回答
展开全部
你想问什么?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |