Announcement

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

  • convert excels files to .dta files

    Hello,

    I am very beginner in Stata, so sorry if my questions seem silly.

    I am reading my friend's code, which converts excel file to .dta, and here is the code

    xls2dta, save(C:\Users\X\Desktop\ENIAChiledata\data_dta,rep l ace) : import excel C:\Users\X\Desktop\ENIAChiledata\data_xls,firstrow

    I googled and as I understand,

    -save(C:\Users\XDesktop\ENIAChiledata\data_dta,repl ace) is to specifies where to put the .dta files after converting; but I do not understand the purpose of "replace" here?

    Really appreciate any help!

    Thanks,

  • #2
    The replace option specifies that if a file of that name already exists, it will be replaced by the new file. Otherwise, xls2dta will stop if the file it is saving to already exists. This is just like the replace option on Stata's save command.

    Comment

    Working...
    X