Dear Experts,
I am not sure if I will make sense here. My problem is regarding importing data in Stata (Version 13.1) from excel files which are auto generated by some kind of respiratory machines. I will try simplifying the problem.
For example:
Apparently the machine produces one file for each participant. Thus, I have 12 years of data in 12 folders for 597 participants for each year. If an automation process is possible, I can carryout the task for each year, folder wise and then append them together in one dataset as they need to be analyzed longitudinally. But some kind of loop help is needed to initiate the process.
Currently it looks impossible to me. But as always, I want to shelter here as my last resort and if not possible, I will bring a big jar of coffee and start doing it manually. Any suggestions or advice is highly appreciated. Please do let me know if anything is not clear, I will try to clarify.
Best wishes,
I am not sure if I will make sense here. My problem is regarding importing data in Stata (Version 13.1) from excel files which are auto generated by some kind of respiratory machines. I will try simplifying the problem.
For example:
Code:
I have the following three Excel files in a directory: File-1: 247LAG.xls Fil-2 : 042DM.xls File-3: 046KFR.xls Task-1: I need to extract particular cell values from each of these 3 files: ************************************************************************************ From each file: cell: C40 cell: D39 cell: E43 Cell values do not have any variable name/header. That is how the software of the machine generates the output. Task-2: Each three cell values should be imported in three columns in a Stata dataset and will have three different names as variables: *********************************************************************************** data from Cell: C40 to be saved as in a column/variable name "VCO2" data from Cell: D39 to be saved as in a column/variable name "O2" data from Cell: E43 to be saved as in a column/variable name "REE" Task-3: Each row will identify the participant with an ID that corresponds to the initial part of the file name (without .xls extension). ************************************************************************************** The number part in the alpha-numeric file name can vary from 001 to 597 and the Alphabets can vary from any combination of A-Z !!.
Currently it looks impossible to me. But as always, I want to shelter here as my last resort and if not possible, I will bring a big jar of coffee and start doing it manually. Any suggestions or advice is highly appreciated. Please do let me know if anything is not clear, I will try to clarify.
Best wishes,