Dim str As String = "abc.xlsx" Dim App As New MSExcel.Application app.DisplayAlerts = False Dim Wb As MSExcel.Workbook = App.WorkBooks.Add Wb.WorkSheets(1).name = str Dim strLuJing="d:\Download1\" & str Wb.SaveAs(strLuJing) App.Quit Dim strLuJingJian ="d:\Download\" & str If FileSys.FileExists(strLuJing) Then system.Threading.Thread.sleep(1000) If FileSys.FileExists(strLujingjian) Then FileSys.DeleteFile(strLuJingJian, 2, 2) FileSys.MoveFile(strLuJing,strLuJingJian) End If
|