Hi,
Please, I have 5 excel files: "File1.xls" to "File5.xls". Each file contains only 1 sheet: "Sheet1"
I want to import and merge them using variable id.
variable id uniquely identifies each observation in the excel files.
Usually, I import each file separately save them .dta, then merge. or use xls2dta to convert to. dta before merging. But I was looking for doing it with loop (foreach or forval), is that possible ? also if I have these files with completely different names (not indexed by numbers) for example instead of "File1.xls" I have "name.xls" and "File2.xls" "age.xls". is that possible?
I'm not also interested to keep the separate .dta files created before the merger
I would much appreciate your assistance on the subject.
Thank you in advance
Related Posts with Using loop to import and merge excel files
Date Help: (DM) Dates without Years and Unequal IntervalsSorry this is a very basic problem. I have a time series covering 1.5 years. The datevar is a string…
Factor analysis - Using factors in regression as covariatesDear all, I would like to know your opinion about the following issue: I have a set of variables the…
expanding datasetDear all I have a dataset as follows: Code: clear input byte loan_id int lender_id byte key_lend…
Interacting variablesHello, I need some help. I'm doing my master thesis about renewable energies and politics I have a …
Keep time within a range from DateTimeHi Everyone! I am writing my dissertation which is on "The Impact of Macroeconomic Announcements on…
Subscribe to:
Post Comments (Atom)
0 Response to Using loop to import and merge excel files
Post a Comment