Dim dt As DataTable = DataTables("rs_productinfo")Dim 列名() As String = {"proclass", "probrand", "probar","procode","proname","momunit","sonunit","unitno","sourcetype","prospecs","timesafe","prostate","checkbar","proid"}
Dim excel列() As String = {"proclass", "probrand", "probar","procode","proname","momunit","sonunit","unitno","sourcetype","prospecs","timesafe","prostate","checkbar","商品ID"}
Dim Result As DialogResult
Result = MessageBox.Show("确定要导入吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If Result = DialogResult.Yes Then
Dim dlg As New OpenFileDialog
dlg.Filter = "Excel文件|*.xls"
dlg.MultiSelect = True '允许选择多个文件
If dlg.ShowDialog =DialogResult.OK Then
Dim Book As New XLS.Book(dlg.FileName)
Dim Sheet As XLS.Sheet = Book.Sheets("商品信息")
dt.ResumeRedraw()
dt.StopRedraw()
'systemready = False