Dim objExcel
'Create an object for Excel Application
Set objExcel = WScript.CreateObject("Excel.Application")
Set temp = objExcel.Workbooks.Open("C:\Documents and Settings\deepakpe\Desktop\Mine_doc\temp.xlsx")
MsgBox temp.Worksheets.Count
MsgBox temp.Worksheets.Application
temp.Worksheets.Application.DisplayAlerts = false
temp.Worksheets.Delete
objExcel.Workbooks.Close ()
objExcel.Quit
'Release the object
Set objExcel = Nothing
No comments:
Post a Comment