以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  提示流不可写入  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=106456)

--  作者:tingke
--  发布时间:2017/9/9 4:39:00
--  提示流不可写入
Dim Book As New XLS.Book("E:\\onedrive\\Doosung\\G3K\\G3K模板.xlsx")
Dim Sheet As XLS.Sheet = Book.Sheets(0)
Dim dlg As New SaveFileDialog \'定义一个新的SaveFileDialog
dlg.Filter= "Excel文件|*.xlsx" \'设置筛选器
dlg.FileName = "G3K" & format(Date.today, "M-d") & ".xlsx"
If dlg.ShowDialog = DialogResult.Ok Then
    Book.Save(dlg.FileName)
    Dim Proc As New Process
    Proc.File = dlg.FileName
    Proc.Start()
End If

--  作者:tingke
--  发布时间:2017/9/9 4:39:00
--  
之前好好的的,突然提示流不可写入
--  作者:有点蓝
--  发布时间:2017/9/9 8:53:00
--  
E:\\onedrive\\Doosung\\G3K\\G3K模板.xlsx

文件为只读,或者被其它程序占用。