參考
--
Imports System.Xml
Imports System.Data
[匯出]
Dim my_datatable As New DataTable
my_datatable = CType(DataGridView1.DataSource, DataTable)
my_datatable.WriteXml(save_file.FileName)
[匯入]
Dim xmlFile As XmlReader
xmlFile = XmlReader.Create(open_file.FileName, New XmlReaderSettings())
Dim ds As New DataSet
ds.ReadXml(xmlFile)
DataGridView1.DataSource = ds.Tables(0)
沒有留言:
張貼留言