Importing data from Excel

Key points

  1. Importing data into STATA is easy, especially if it is in a spreadsheet program like Microsoft Excel.
  2. Select the data in Excel using CTRL + A or by clicking and dragging, then right-click and copy. In STATA, open the Data Editor window in edit mode (either by clicking the Data Editor(edit) button or typing "edit" in the command window), then paste the copied data by right-clicking on the top-left cell and selecting "Paste." If the first row contains variable names, choose "Treat first row as variable names."
  3. Save the imported data by clicking the "Save" button and naming the file.
  4. To view the data without making changes, open the Data Editor in browse mode by typing "browse" in the command window and pressing Enter. In browse mode, data is protected from accidental changes.

Complete and Continue