

- #CONVERTING EXCEL TO STATA IN STAT TRANSFER CODE#
- #CONVERTING EXCEL TO STATA IN STAT TRANSFER WINDOWS#
#CONVERTING EXCEL TO STATA IN STAT TRANSFER CODE#
The following Stata code will save the data set in memory as outputdata.dta, then convert it to Excel format: The command to run Stat/Transfer can be included in many statistical programs. "c:\program files (x86)\stattransfer10\st.exe" " inputfile" " outputfile"
#CONVERTING EXCEL TO STATA IN STAT TRANSFER WINDOWS#
In Windows you also have to give the location of the program, and it's best to put file names in quotes (sometimes they're not needed, but often they are). To get a command line, click the Windows Logo button ( Start in older versions of Windows) and then in the Search ( Run) box type cmd. Will convert file from SAS format to Stata format. Stat/Transfer will determine the file types by their extensions. On Linstat you can use Stat/Transfer to convert a file very quickly and easily from the command line using st rather than stattransfer: Using Stat/Transfer from the Command Line For example, by default Stat/Transfer will stop reading an Excel file if it encounters a blank line (on the assumption that anything after that will be notes or other material other than data) but you can change that behavior by clicking the Options tab and then Worksheets. Options has a wide variety of settings for converting various kinds of files. Observations lets you convert just a subset of your data. Variables lets you choose which variables are converted, and set their types.

In general ASCII/Text - Delimited can only be used to convert text files if they are very structured. To create an SPSS file set the Output File Type to SPSS Unicode for Windows. The file types are mostly self-explanatory. Then click Transfer and Stat/Transfer will convert the file for you. Set the Output File Type to the kind of file you want. Set the Input File Type to the kind of file you have, then click Browse to identify the particular file you want to convert. If you start Stat/Transfer on Winstat, in the lab or by typing stattransfer on Linstat you'll see the following: Using Stat/Transfer's Graphical User Interface

It is quick andĮasy to use, and available on Winstat, Linstat and in the SSCC computer labs. To another (for example SPSS to Stata, or Excel to SAS). Stat/Transfer is a utility program that converts data sets from one format
