Hello - I am attempting to import all excel sheets from a specified folder, and save as STATA files. I am using the following code, and do not receive an error message - but no files are imported. Can anyone detect an error, or have an alternate solution to this problem?



local files : dir "G:\CTRHS\CCHE\Projects\KFHP - MELO\14. Virtual Care Initiative\3--Data\Clinical Data\Baseline data downloads\AP" files ".xlsx"

cd "G:\CTRHS\CCHE\Projects\KFHP - MELO\14. Virtual Care Initiative\3--Data\Clinical Data\Baseline data downloads\AP"

foreach file in `files' {
import excel using `file', sheet("Backend for data export ") firstrow clear
local hcid = HC_ID[1]
save "`hcid'.dta", replace
}