以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  求教:合并条件无效是怎么回事呢.  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=42017)

--  作者:飞天
--  发布时间:2013/11/1 16:45:00
--  求教:合并条件无效是怎么回事呢.
Dim dlg As New OpenFileDialog \'定一个新的OpenFileDialog 
Dim s1 As String
   dlg.Filter= "Excel文件|*.xls"    \'|文本文件|*.txt|Access文件|*.mdb" \'设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then \'如果用户单击了确定按钮
   s1 = dlg.FileName
   If s1<> " " Then
      Dim Book As New XLS.Book(s1)
      Dim ss3 As String = Book.Sheets(0).Name + "$"
      Dim mg As New Merger
      mg.SourcePath = s1
      mg.Format = "excel" \'指定格式
      mg.SourceTableName = ss3     \'指定要合并的表
      mg.DataTableName = "客户信息"   \'指定接收数据的表
      mg.Filter = "[身份证号] <> \'\'"   \'指定合并条件
      mg.Merge() \'开始合并
  End If
End If

--  作者:Bin
--  发布时间:2013/11/1 16:48:00
--  
mg.Filter = "[身份证号]  is not null"