|Title||Converting other format files into Stata dataset files|
|Author||Shannon Driver, StataCorp|
The most popular spreadsheet format is the Microsoft Excel® worksheet. You can use the import excel command to read .xls and .xlsx files into Stata.
If your data are stored as a SAS XPORT file, you can use the import sasxport command to read this file into Stata.
Most spreadsheet and statistical software packages are able to export data as ASCII text files containing fixed-format, free-format, comma-delimited, or tab-delimited data. If your package has this feature, you should be able to export the data, and then read the data into Stata using the infile (fixed format or free format), infix, or insheet command, depending on the file format. For information about infiling data and the method you should use, see [D] infiling.
Another way to convert your data to Stata format is to register your data as an ODBC source and then use Stata's odbc commands to read the data directly into Stata.