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
putdocx phtestHi Statalist I am trying to export the proportional hazards statistics to a word document (that als…
Getting common coefficient and restrictions in an equationI want to estimate an equation by setting restrictions to coefficients. Likewise, I want to get comm…
Create a Pseudo Panel Data and AnalysisHello eveyone I would like to analyze the determinants of the dynamics of women's employment (15-49…
Using the ipdmetan functionHi, I am trying to run a two stage individual patient data meta-analysis and I have derived treatmen…
IV interpretation of result of test of endogeneity with weak instrumentsDear all, I will please like to find out a few things. I use OLS in my analysis and to address endo…
Subscribe to:
Post Comments (Atom)
0 Response to import all excel sheets from a specified folder, and save as STATA files
Post a Comment