
Open "file.txt" in Excel and SaveAs "file.xls
I open a text file in Excel, then I want to save it as a
file.xls. When I close my excel object, objXL.Quit, it
asks me if I want to save the changes. I don't know how to
avoid this. Here is what I'm doing:
strTextFile = "C:\CardList.txt"
Set objXL = WScript.CreateObject("Excel.Application")
Set objWorkBook = objXL.WorkBooks.Open(strTextFile, 2, 1,
1, 1)
objWorkBook.SaveAs("C:\CardList.xls")
objXl.Quit