C#将xml文件数据导入datagridview中
来源:互联网 发布:阿里云rds是什么 编辑:程序博客网 时间:2024/05/29 18:02
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
string strPath=null;//文件咱径
private void button1_Click(object sender, EventArgs e)
{
openFileDialog1.Filter = "xml文件|*.xml";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
strPath = openFileDialog1.FileName;
}
}
private void button2_Click(object sender, EventArgs e)
{
if (strPath != null)
{
DataSet ds = new DataSet();
ds.ReadXmlSchema(strPath);
ds.ReadXml(strPath);
dataGridView1.DataSource = ds.Tables[0].DefaultView;
}
else
{
MessageBox.Show("请选择XML文件");
}
}
{
public Form1()
{
InitializeComponent();
}
string strPath=null;//文件咱径
private void button1_Click(object sender, EventArgs e)
{
openFileDialog1.Filter = "xml文件|*.xml";
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
strPath = openFileDialog1.FileName;
}
}
private void button2_Click(object sender, EventArgs e)
{
if (strPath != null)
{
DataSet ds = new DataSet();
ds.ReadXmlSchema(strPath);
ds.ReadXml(strPath);
dataGridView1.DataSource = ds.Tables[0].DefaultView;
}
else
{
MessageBox.Show("请选择XML文件");
}
}
- C#将xml文件数据导入datagridview中
- 将TXT文档中数据导入XML文件中 C#
- c#将datagridview中的数据导入到Excel中(winForm)
- C#将数据从datagridView中导入到Excel
- C#实现将DataGridView中的数据导入到Excel中
- 在VS2005中,将DataGridView中的数据导入Excel文件
- 将Excel的数据导入DataGridView中
- 将DataGridView中的数据导入Excel中
- 将excel中的数据导入datagridview中
- 在VS2005中,将DataGridView中的数据导入到Excel文件中
- c#读取xml文件到datagridview中
- C#将List中的数据导入Excel文件中
- DataGridView中的数据导入导出到XML文件
- 将DataGridView中的数据导入Excel中,并显示Excel
- 怎么将excel数据导入到datagridview中
- C#Winform 将DataGridView中的数据导入到Excel中
- C#操作Excel,将DataGridView数据导出到Excel中
- 用C#将DataGridView中数据写到Excel
- 将windows 8安装到U盘随身带!
- 压缩算法概述
- MSSQL 存储过程(一)
- 折腾VMWare Workstation 9在虚拟机中安装Hyper-V服务器
- ftrace 使用
- C#将xml文件数据导入datagridview中
- 微软开始反击
- C#导出数据到word相关问题汇总
- eBay携手走秀再攻中国市场
- Eclipse 4 Android 使用技巧
- 开源Roller部署笔记-只需5分钟
- 在linux下如何编译C++程序
- url在js,cs中编解码
- 【原创】:做独立网站和网店的实战营销秘笈 (二)