Hello guys, I have almost 90 csv files which I'd like to transform into .dta each one of them separately. That's why I'm using a loop, however each .dta file created is not separated each column, it shows all of the columns in just one. I think that the problem is that I'm not separating the columns properly. The delimiter in the csv file is ";". I'd really appreciate your help.
This is my code:
This is my code:
Code:
cd "/Users/fernandobastidasespinoza/Desktop/Universidad/2022 S2/Tesis/Datos/Asistencia"
clear
local myfilelist : dir . files"*.csv"
foreach file of local myfilelist {
drop _all
insheet using `file', comma
local outfile = subinstr("`file'",".csv","",.)
save "`outfile'", replace
}

Comment