Dear statalister,
I have a weird problem while insheeting data from a txt file. For some reason, one of the string variable contains a CR (carriage return) characters that makes the line breaks and mess up my import. At the end of each observation, there is a CR and LF character.
first line: Exclusion de cours;;15/09/2014;Dissipation, cr
Manque de respect caractérisé; cr lf
second line: Recopier le cours p. 16 et 17, le savoir faire p. 18 et 19: 1, 2, 3. cr lf
If I simply insheet this txt file the first observation is diplayed in two lines.
One way I found to deal with the problem is to remove all cr from the txt file using filefilter:
filefilter "EXP.txt" "EXP_clean.txt", from(\r) to("")
It works fine but since I am going to use this problem in thousands of txt file I am affraid it is going to mess up others by removing all cr.
Have you ever experienced something like that?
Thanks so much
Adrien
I have a weird problem while insheeting data from a txt file. For some reason, one of the string variable contains a CR (carriage return) characters that makes the line breaks and mess up my import. At the end of each observation, there is a CR and LF character.
first line: Exclusion de cours;;15/09/2014;Dissipation, cr
Manque de respect caractérisé; cr lf
second line: Recopier le cours p. 16 et 17, le savoir faire p. 18 et 19: 1, 2, 3. cr lf
If I simply insheet this txt file the first observation is diplayed in two lines.
One way I found to deal with the problem is to remove all cr from the txt file using filefilter:
filefilter "EXP.txt" "EXP_clean.txt", from(\r) to("")
It works fine but since I am going to use this problem in thousands of txt file I am affraid it is going to mess up others by removing all cr.
Have you ever experienced something like that?
Thanks so much
Adrien
Comment