Hi,
I am trying to import Excel files into Stata. The Excel files contain multiple worksheets and are password-protected. I get an error message r(603) that the Excel file cannot be loaded for about 35% of the files. I've opened these Excel files and re-saved them, but I still get the same error. I'm not sure what is happening, especially since this only happens for a subset of files.
Thanks,
Simone
I am trying to import Excel files into Stata. The Excel files contain multiple worksheets and are password-protected. I get an error message r(603) that the Excel file cannot be loaded for about 35% of the files. I've opened these Excel files and re-saved them, but I still get the same error. I'm not sure what is happening, especially since this only happens for a subset of files.
Code:
global raw "\data" global batch "1st batch" global files: dir "${raw}Suntec\\${batch}" files "*.xlsx", respectcase foreach file of global files { global openfile "${raw}Ardem/${batch}/`file'" import excel using "${openfile}", sheet("General Info") allstring clear ... }
Simone
Comment