montypython1
Technical User
Greetings,
I am trying to search a "CSV" file to replace specific characters with different characters (ex: replace 'BELLEVUE' with 'AAAAAAAAAA'). I checked the Tek-Tips archives, I found what I was after (thread184-1050184), but have not been able to make it work.
I must be overlooking something ... the code seems rather straightforward (see below):
**********************************************
lcMyString = FILETOSTR('tables\1on1fi quotes.csv')
WAIT WINDOW 'converting file ... please wait' NOWAIT
STRTRAN(lcMyString , 'BELLEVUE' , 'AAAAAAAAAA')
STRTOFILE(lcMyString , 'tables\1on1fi quotes new2.csv')
?lcMyString
**********************************************
FILETOSTR does convert the file to a text string, and STRTOFILE does successfully convert it back to a file, but STRTRAN does NOT find and replace the characters that I have requested.
Any ideas?
Thanks,
Dave
I am trying to search a "CSV" file to replace specific characters with different characters (ex: replace 'BELLEVUE' with 'AAAAAAAAAA'). I checked the Tek-Tips archives, I found what I was after (thread184-1050184), but have not been able to make it work.
I must be overlooking something ... the code seems rather straightforward (see below):
**********************************************
lcMyString = FILETOSTR('tables\1on1fi quotes.csv')
WAIT WINDOW 'converting file ... please wait' NOWAIT
STRTRAN(lcMyString , 'BELLEVUE' , 'AAAAAAAAAA')
STRTOFILE(lcMyString , 'tables\1on1fi quotes new2.csv')
?lcMyString
**********************************************
FILETOSTR does convert the file to a text string, and STRTOFILE does successfully convert it back to a file, but STRTRAN does NOT find and replace the characters that I have requested.
Any ideas?
Thanks,
Dave