stata

Variable names not showing in Stata after importing Excel file


I am trying to import an Excel file which has the first row as the variable names. Once imported the variable viewer shows only a,b,c.... for the variable names. Is there a command to let Stata know that the first row is the variable names?


Solution

  • If you type db import excel you will see a tick box Import first row as variable names.

    Alternatively, use the firstrow option (not command) from the command line:

    import excel ... , firstrow

    For more, read the help:

    help import excel