I have used the below code snippet to write from xls file to txt. Apparently it works for the first 11 lines in the excel and then throws error of invalid procedure @ this l