Menu
How can I convert data files between statistical packages like Stata and Excel? (a common statistical package used in MIT's economics, political science, and other departments) creates.dta files, which are not standard for other statistical software (like SPSS, R, or Excel). Stata can also import tab or comma delimited files, though cleanup is often necessary. Frequently, data sets are only available in other formats and will need to be converted into files that Stata can read. There are two main options for users looking to convert files. The first, and often easiest, is the commercial software package Stat/Transfer, which is expensive but often the only option for complicated data transfer.
Loading CSV/text files with more than a million rows into Excel. Much faster than with a standard 1M line excel file. Log in to Reply. Billy says: April 3, 2017 at 10:34 pm. I have the same problem but I have a Mac and apparently I can’t get query for it. This is the easiest way to put data in Excel into Stata, just copy-and-paste. If you do, the save the file as *.csv and import it into Stata (see the insheet section. To convert those string characters into numeric you need to use destring.
For more information, see:. This software is not standard at MIT but it may be available on machines at MIT in some academic departments and at.
Users may also be able to manually convert data files into tab-delimited files that Stata will read. For more on this, see Stata's website:. Since conversions can often be tricky, clients with questions may wish to look at the resources in this Wiki article:. Note that Stat/Transfer may be the only good way to convert old Stata files into ones readable by newer versions of Stata (which is not backwards compatible with early versions).
Can't open a.dta file? If you want to open a.dta file on your computer, you just need to have the appropriate program installed.
If the.dta association isn't set correctly, you may receive the following error message: Windows can't open this file: File: example.dta To open this file, Windows needs to know what program you want to use to open it. Windows can go online to look it up automatically, or you can manually select from a list of programs that are installed on your computer. To change file associations:. Right-click a file with the extension whose association you want to change, and then click Open With. In the Open With dialog box, click the program whith which you want the file to open, or click Browse to locate the program that you want.
Select the Always use the selected program to open this kind of file check box.