Dim mg As New Merger
mg.SourcePath = "d:\data\销售管理.xls"
mg.Format = "excel" '指定格式
mg.SourceTableName = "订单$" '指定要合并的表
mg.DataTableName = "订单" '指定接收数据的表
mg.Fields = "日期,客户,数量,单价,产品"'Fields是一个字符串属性,不是一个函数
mg.Merge() '开始合并
mg = New Merger
mg.SourcePath = "d:\data\销售管理.xls"
mg.Format = "excel" '指定格式
mg.SourceTableName = "客户$" '指定要合并的客户表
mg.DataTableName = "客户" '指定接收数据的客户表
mg.Fields = "日期,客户,客户ID "'指定接收客户表的部分列
mg.Merge() '开始合并客户表