www.elsblog.org - Bringing Data and Methods to Our Legal Madness

29 June 2012

Many--but not all--data sets analyzed in Stata began as Excel spreadsheets. To get to Stata's analytics requires importing Excel files. All too often, what should be a straight-forward task becomes anything but. A recent post on the Stata Blog walks readers through (with helpful screen-shot pictures) the data import process.

The "import excel" command in Stata 12 can help import Excel files into Stata by addressing two specific issues. First, Excel files often contain header and footer information in the first few and last few rows of a sheet, and you may not want that information loaded. A second common problem is that many column labels used in Excel spreadsheet files are invalid as Stata variable names (and therefore cannot be loaded into Stata).