Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Saving multiple Excel files as Stata files

    In "C:\Users\budug\OneDrive\Documents\School\Projects ", I have a few Excel files, namely data_2004, data_2005,...,data_2018. Each file has exactly one sheet and row 1 contains variables' names. How can I save each Excel as a Stata file, retaining the same name?

  • #2
    The user-written xls2dta command available from SSC is often recommended on Statalist for problems like the one you have.
    Code:
    ssc describe xls2dta

    Comment


    • #3
      Thank you William Lisowski.
      The following code worked.
      Code:
       xls2dta , save(C:\Users\budug\OneDrive\Documents\School\Projects\Stata_Files) : import excel C:\Users\budug\OneDrive\Documents\School\Projects\, firstrow

      Comment

      Working...
      X