Foxtable(狐表)用户栏目专家坐堂 → 导入到关联表


  共有3748人关注过本帖树形打印复制链接

主题:导入到关联表

帅哥,在线噢!
wlj88868
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:142 积分:1042 威望:0 精华:0 注册:2016/4/27 9:39:00
导入到关联表  发帖心情 Post By:2022/11/17 21:19:00 [只看该作者]

Dim dlg As New OpenFileDialog '定义一个新的OpenFileDialog
dlg.Filter = "Excel|*.xlsx" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
    Dim mg As New Merger
     mg.Format = "excel"
    mg.SourcePath = dlg.FileName
    mg.SourceTableName = "出库明细$"
    mg.DataTableName = "出库明细"
    mg.Merge()
End If

 

 

导入后出库日期和出库单号不会增加出库列表的日期和单号,,改导入表名“出库列表.出库明细”又不行,要怎么改出库明细的日期和单号关联到出库列表

麻烦老师给提示一下


 回到顶部
帅哥哟,离线,有人找我吗?
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106641 积分:542382 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2022/11/17 21:56:00 [只看该作者]

方法1、
dim id as integer = datatables("出库明细").compute("max(_identify)")

Dim dlg As New OpenFileDialog '定义一个新的OpenFileDialog
dlg.Filter = "Excel|*.xlsx" '设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then '如果用户单击了确定按钮
    Dim mg As New Merger
     mg.Format = "excel"
    mg.SourcePath = dlg.FileName
    mg.SourceTableName = "出库明细$"
    mg.DataTableName = "出库明细"
    mg.Merge()

dim r as row = tables("出库列表").current

datatables("出库明细").replacefor("出库单号",r("出库单号"),"_identify >" & id)

datatables("出库明细").replacefor("出库日期",r("出库日期"),"_identify >" & id)

End If


2、使用这种方法导入:http://www.foxtable.com/webhelp/topics/2334.htm


 回到顶部
帅哥,在线噢!
wlj88868
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:142 积分:1042 威望:0 精华:0 注册:2016/4/27 9:39:00
  发帖心情 Post By:2022/11/17 22:46:00 [只看该作者]

谢谢老师,,我试一下

 


 回到顶部