Importing Excel files in Stata | Johan Osterberg - Product Engineer

Importing Excel files in Stata

April 13, 2019

In this short post we'll look at importing data from an Excel file into Stata. For this example we'll use some training data from another statistics package, namely SPSS and the dataset demo. Typical location of this file would be, on a Windows 10 system:

C:\Program Files\IBM\SPSS\Statistics\[version]\Samples\[lang]\demo.xlsx  

To import this into Stata, click File >> Import >> Excel spreadsheet. Browse to the above location and check Import first row as variable names. Now the spreadsheet should be imported ok. Let's check it by summarizing:

Summarizing imported excel files


Profile picture

Written by Johan Osterberg who lives and works in Gothenburg, Sweden as a developer specialized in e-commerce. Connect with me on Linkedin

2024 © Johan Osterberg