Foxtable(狐表)用户栏目专家坐堂 → 选择模板


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

主题:选择模板

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2015/3/31 16:59:00 [显示全部帖子]

 呃,都可以

 

Dim dr As Row = Tables("表A").Current
If dr("客户简称") = "A客户" Then

    Dim Book As New XLS.Book(ProjectPath & "Attachments\A客户合同明细.xls")
    Dim fl As String = ProjectPath & "Reports\QD" & Format(Date.Today,"yyyyMMdd") & ".xls"
    Dim Sheet As XLS.Sheet = Book.Sheets(0)
    Sheet(4,14).Value = "A" & Format(Date.Today, "yyMMdd") '写入合同编号
    Book.Build() '生成细节区
    Book.Save(fl) '保存工作簿
    Dim Proc As New Process '打开工作簿
    Proc.File = fl
    Proc.Start()
   
Else
   
    Dim Book As New XLS.Book(ProjectPath & "Attachments\B客户合同明细.xls")
    Dim fl As String = ProjectPath & "Reports\QD" & Format(Date.Today,"yyyyMMdd") & ".xls"
    Dim Sheet As XLS.Sheet = Book.Sheets(0)
    Sheet(4,14).Value = "B" & Format(Date.Today, "yyMMdd") '写入合同编号
    Book.Build() '生成细节区
    Book.Save(fl) '保存工作簿
    Dim Proc As New Process '打开工作簿
    Proc.File = fl
    Proc.Start()
   
End If

 


 回到顶部