×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

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