以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 系统找不到指定文件,请帮忙看看,代码问题 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=119575) |
-- 作者:tingke -- 发布时间:2018/5/28 3:39:00 -- 系统找不到指定文件,请帮忙看看,代码问题 Dim Book As New XLS.Book("E:\\OneDrive\\Doosung\\补货\\补货模板.xlsx") Dim Sheet As XLS.Sheet = Book.Sheets(0) Dim dlg As New SaveFileDialog \'定义一个新的SaveFileDialog dlg.Filter= "Excel文件|*.xlsx" \'设置筛选器 dlg.FileName = format(Date.today, "M-d") & ".xlsx" Dim file As String = dlg.FileName If dlg.ShowDialog = DialogResult.Ok Then \'如果用户单击了确定按钮 Dim Proc As New Process Proc.File = file Proc.Start() End If 希望依据模板生成新表,然后依据需求保存到文件夹
|
-- 作者:有点甜 -- 发布时间:2018/5/28 9:21:00 -- Dim Book As New XLS.Book("E:\\OneDrive\\Doosung\\补货\\补货模板.xlsx") Dim dlg As New SaveFileDialog \'定义一个新的SaveFileDialog dlg.Filter= "Excel文件|*.xlsx" \'设置筛选器 dlg.FileName = format(Date.today, "M-d") & ".xlsx" Dim file As String = dlg.FileName If dlg.ShowDialog = DialogResult.Ok Then \'如果用户单击了确定按钮 book.Build() book.save(dlg.FileName) Dim Proc As New Process Proc.File = dlg.FileName Proc.Start() End If |
-- 作者:tingke -- 发布时间:2018/5/28 19:21:00 -- 回复:(有点甜)Dim Book As New XLS.Book("E:\OneDr... 谢谢甜大大 |