Are you sure it's saving as Excel format, or is it simply that the file has
extension XLS?
Actually, it looks as though you're trying to save the workbook over itself.
You need to specify a different path or a different file name in your save.
If you want it to have extension TXT, you need to remove the XLS from the
file name and replace it with TXT.