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
}
Related Posts with import all excel sheets from a specified folder, and save as STATA files
New version of descsave on SSCThanks as always to Kit Baum, a new version of the descsave package is now available for download fr…
Within Family fixed effects in cross sectionHello everyone, I have a data for multiple individuals from different families at one (1) point in …
** New On SSC ** censusapi - module to download census dataHi all Thanks to Kit Baum, censusapi is now available on SSC. This tool facilitates downloading dat…
New version of descgen on SSCThanks once again to Kit Baum, a new version of the descgen package is now available for download fr…
ThresholdsHi everyone I want to investigate from wich debt rate the labor productivity will start decreasing …
Subscribe to:
Post Comments (Atom)
0 Response to import all excel sheets from a specified folder, and save as STATA files
Post a Comment