Example
set xl=createobject("excel.application")
sPath=InputBox("enter path where you want to save the file")
set wb=xl.workbooks.Add
Set ws=wb.worksheets(1) 'sheetname
ws.Name="New Name"
ws.cells(1,1).value="Completed creation of new excel file"
wb.saveas (sPath)
wb.close
xl.quit
Set xl=nothing
No comments:
Post a Comment