You could try

if right(textInputStream.Readall,1) = EndOfLine then

If you exercise total control ofver the origbinal files creation though, your best bet is to make sure it goes out with an EndOfLine character appended to it.

Cheers,
Tom

On 11/03/2006, at 1:33 PM, Robert Carroll wrote:

Hi,

I'm running into a basic problem keeping track of carriage returns in a tab delimited text file.

I am writing a very simple file structure by taking the entries of a dictionary, loading them into a string, then writing them line by line.

dim t as textoutputstream
dim f as folderitem
dim s as string

t=f.appendtotextfile

s= dict.value(dict.key(1)) + chr(9) + dict.value(dict.key(2)) + chr (9) + dict.value(dict.key(3))

t.writeline s

The resulting file opens properly in Excel, however if it is edited (rows inserted or deleted, cell values modified) the next "appendtotextfile" will usually write an extension to the last line of the spreadsheet instead of starting a new line. Subsequent lines write properly.

Is there a simple way to test if the last character of the existing file is a line break?

thanks

Rob
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

All questions and answers unless otherwise stated are in Relation to Mac OS X 10.4 and later.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to