搞定了,谢谢,两位版主,是我开始没理解导入与合并的用法。
Dim lbl As WinForm.DateTimePicker
lbl = e.Form.Controls("DateTimePicker1")
Dim year As Integer = lbl.Value.Year
Dim month As Integer = lbl.Value.Month
Dim day As Integer = lbl.Value.Day
For Each File As String In FileSys.GetFiles("\\192.168.65.15\每日bom\" & year & "\" & year & "." & month & "\" & year & "." & month & "." & day & "")
Dim fileName As String = FileSys.GetName(File)
Dim mg As New Merger
mg.SourcePath = File '指定数据文件
mg.Format = "Excel" '指定导入格式
mg.SourceTableName = "Exported$" '指定要导入的表
mg.DataTableName = "BOM明细表" '导入后的表名
mg.Merge()
Next