Text Item Delimiter problem

I am exporting a tab-delimited text file from a table view. The first row is fine but every row below that starts with a tab so the file reads like:
HELLO WORLD
HELLO WORLD
HELLO WORLD
HELLO WORLD

etc…
Here’s my code:


		set pathName to display save panel
		set pathName to path name of save panel
		set theData to (content of every data cell of every data row of theDataSource)
		repeat with i in theData
			set contents of i to i & return
		end repeat
		set {TID, text item delimiters} to {text item delimiters, tab}
		set theData to (theData as string)
		set text item delimiters to TID
		set theFile to open for access (pathName as POSIX file) with write permission
		write theData to theFile
		close access theFile

Thanks for the help - I’m clueless

Model: Powerbook G4
Browser: Safari 523.10
Operating System: Mac OS X (10.5)

I still haven’t been able to fix this. Anyone have an idea?

Thanks

The difficulty with answers here is that we see the result you don’t like, but not what you started with.