×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

Looking for HELP: I create a Macro by using VBA, and the code as inside,

I really want to do is check if the xl_Data2.xls is exist or not, if exist then update that file. but I don't know how to do... please help ...........

Code:
---------------------------------------------------------------------------
strPath = Server.MapPath("..\text\receipts.xls")
set myxls = CreateObject("Excel.Application")
myxls.WorkBooks.open strPath
Set sheet = myxls.ActiveWorkbook.Sheets(1)
myxls.ActiveWorkBook.SaveAs ("c:\text\xl_data2.xls")
myxls.ActiveWorkBook.Close
myxls.Application.quit
set myxls = nothing
Report