private void button1_Click(object sender, EventArgs e)
{
saveFileDialog1.ShowDialog();
string filepath = saveFileDialog1.FileName.Trim();
string fstyle = filepath.Substring(filepath.LastIndexOf('.') + 1, filepath.Length - filepath.LastIndexOf('.') - 1).ToUpper();
if (filepath != string.Empty)
{
if (fstyle == "XLS")
{
gridView1.ExportToXls(filepath);
}
else if (fstyle == "XLSX")
{
gridView1.ExportToXlsx(filepath);
}
}
}
使用saveFileDialog导出gridControl中 gridView里的数据
最新推荐文章于 2024-07-22 16:38:17 发布