Announcement

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

  • Issue importing files using xls2dta

    Code
    Code:
    tempfile baseline
    save `baseline'
    
    cd "/Users/kalikyo/Desktop/Anthony/Uganda/2022 second term analysis/Endline ns"
    
    *This indicates the folder location on your computer. All endline files for both CONTROL AND TREATMENT and NO OTHER EXCEL FILES must be here. Probably safest not have any other files here, no matter the extension.
    
    xls2dta, replace: import excel ., firstrow
    
    xls2dta, clear  : merge 1:1 uuid, force
    I am trying to import 2 files from the following directory. I have verified that the directory I specified is correct even so I am receiving the following error

    . xls2dta, replace: import excel ., firstrow
    file ./~ Endline Cleaned.xlsx not found
    r(601);


    This error does not really make sene to me because I have used these commands to import files previously, what am I missing?

  • #2
    xls2dta is (probably) from SSC.

    The option force should not be used with merge. If there is a problem merging the files, solve it; don't ignore it.

    That being said, please show the results of

    Code:
    cd "/Users/kalikyo/Desktop/Anthony/Uganda/2022 second term analysis/Endline ns"
    dir
    and

    Code:
    cd "/Users/kalikyo/Desktop/Anthony/Uganda/2022 second term analysis/Endline ns"
    xls2dta, replace verbose : import excel ., firstrow
    (note verbose option). The output may give me an idea of what is causing the problem.

    Comment

    Working...
    X