Use Print instead of Write.

PS Couldn't you just save the file as text instead of doing things row by row?