Hi guys,
I'm trying to import a .txt file into Stata. Please see how the .txt file look in the attachment.
My main struggle is that this file has the first columns delimited with ";" and the last columns without any delimiter. The first line is the name of the variables. The variables marked from A to G are all under "TX_Respostas". And that's this one I need to split up because they are actually separated variables.
So, I have tried:
insheet using TS_QUEST_ALUNO.TXT, delimiter(";")
But this did't work because the variables under "TX_Respostas" came as one single variable. I have also tried the command infix using a dictionary, but this didn't work because I couldn't get rid of the ";" and it came in the middle of the data, messing it up.
I also cannot save it to Excel and manually add demiliter there due to it very large size: more than 5 million observations.
So if you could help me on that...
Thanks.
I'm trying to import a .txt file into Stata. Please see how the .txt file look in the attachment.
My main struggle is that this file has the first columns delimited with ";" and the last columns without any delimiter. The first line is the name of the variables. The variables marked from A to G are all under "TX_Respostas". And that's this one I need to split up because they are actually separated variables.
So, I have tried:
insheet using TS_QUEST_ALUNO.TXT, delimiter(";")
But this did't work because the variables under "TX_Respostas" came as one single variable. I have also tried the command infix using a dictionary, but this didn't work because I couldn't get rid of the ";" and it came in the middle of the data, messing it up.
I also cannot save it to Excel and manually add demiliter there due to it very large size: more than 5 million observations.
So if you could help me on that...
Thanks.
Comment