以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  [求助] 转Excel  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=177776)

--  作者:sanny
--  发布时间:2022/6/3 12:21:00
--  [求助] 转Excel
老师, 以下是把表ConsumableMaterial中的内容转到Excel sheet中,每次生成,都在sheet中,如何改成每次生成单个的excel文件,名称名“list + 日期时间”


Dim flg As New  SaveExcelFlags
flg.RowNumber = True
flg.CellStyle = True
ShowAppWindow("list.xls",5)
Tables("ConsumableMaterial").SaveExcel(ProjectPath & "RM\\list.xls",format(Date.now,"yyyyMMddHHmmss") ,flg)
If  ShowAppWindow("Orderlist.xls",1) = False Then
    Dim  Proc As New Process
    Proc.File = ProjectPath & "RM\\list.xls"
    Proc.Start
End If

--  作者:狐狸爸爸
--  发布时间:2022/6/3 15:50:00
--  
Dim flg As New  SaveExcelFlags
flg.RowNumber = True
flg.CellStyle = True
ShowAppWindow("list.xls",5)
Tables("ConsumableMaterial").SaveExcel(ProjectPath & "RM\\list.xls",format(Date.now,"yyyyMMddHHmmss") ,flg)
If  ShowAppWindow("Orderlist.xls",1) = False Then
    Dim  Proc As New Process
    Proc.File = ProjectPath & "RM\\list" &  Format(date.now,"yyyyMMddHHmmsss")  ".xls"
    Proc.Start
End If

--  作者:狐狸爸爸
--  发布时间:2022/6/3 15:51:00
--  
http://www.foxtable.com/webhelp/topics/0362.htm