如上
网友回答
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim openxmlfile As String
Dim myset As New DataSet("xmldataset")
OpenFileDialog1.Filter = "XML文件|*.xml"
OpenFileDialog1.ShowDialog()
openxmlfile = OpenFileDialog1.FileName
If Not openxmlfile = "" Then
myset.ReadXml(openxmlfile)
DataGridView1.DataSource = myset
End If
End Sub