Dim dlg As New OpenFileDialog '定义一个新的OpenFileDialog
dlg.Filter= "Excel文件|*.xls;*.xlsx" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
Dim mg As New Merger
mg.SourcePath = dlg.FileName
mg.Format = "excel"
Dim book As new XLS.Book(dlg.fileName)
mg.SourceTableName = book.Sheets(0).name & "$"
mg.DataTableName = "工资数据输入表"
mg.Merge()
End If
这是合并代码,excel表中有一列名:身份证号码。希望合并excel数据时跳过身份证号码为空值的行