数据从datagridview到excel文件 [英] data from datagridview to excel file
本文介绍了数据从datagridview到excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好!
在这里,我创建了一个将数据从datagridview保存到excel的函数
hi to all!
here i create a function to save data from datagridview to excel
private void button2_Click(object sender, EventArgs e)
{
DataTable dt = new DataTable();
DataSet ds = new DataSet();
dt = (DataTable)dataGridView1.DataSource;
ds.Tables.Add(dt);
}
how to save in excel file
推荐答案
尝试从答案到问题 [
这篇关于数据从datagridview到excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文