in reply to Creating Excel Spreadsheet from text data file

You know, Excel natively supports Comma-Separated-Value (CSV) text files. No transformation like this should be necessary. Excel will also do tab-delimited text files, and if you use its import features to their fullest, you can get it to read just about any kind of tabulated textual data at all, including HTML tables.

If there's some other reason you're doing this aside from allowing Excel to access the data, the other posts should be able to help you on your way. From what your question seems to indicate, however, none of what you're doing here should be necessary.

  • Comment on Re: Creating Excel Spreadsheet from text data file