I have this code , but I wanna know how to Create/Delete the Excel File/Sheet
Set x1= CreateObject("Excel.Application")
'Open the File
' how to create this sheet if itn't already exist?
'how to delete the file/sheet after finished?
Set x1 = nothing
I found how to create new XL file and I used your approach to delete it I didn't think of FSO because I thought it couldn't deal with anything but .txt , below is the solution for any one who may need it.
Set xl= CreateObject("Excel.Application")
' Create a File
' Do what ever you want
'Write xl.Worksheets(Sheet1).Cells(1,1) = 5
'Read value = xl.Worksheets(Sheet1).Cells(1,1)
Set xl = nothing
'Delete XL Workbook
Set FSO = CreateObject("Scripting.FileSystemObject")
Set file1 = fso.GetFile("C:\Book1.xls")