Hello everyone,
I'm trying to write code to import certain worksheets from an excel workbook, but I can't quite get it to work properly. Here's the code I have written for it so far:
cd "$pathin\Bank Spreadsheets\XLS spreadsheets"
foreach sheet in "Ex 1" "Ex 2" "Ex 3" "Ex 5" "Ex 6" "Ex 8" "Ex 9" "EX 10" "EX 11" "EX 12" {
import excel using "$pathin\Bank Spreadsheets\XLS spreadsheets\Caliber Home Loans-30992_FUP Findings Exhibits.xls", sheet("`sheet'") cellrange(A5) firstrow clear
save file_`sheet', replace
}
Unfortunately the syntax error that keeps popping up says "invalid '1'. I've tried checking the spacing and the naming of the sheets, but nothing seems to work. Any help would be great, thanks!
Related Posts with Import Excel Loop issues
Propensity score matchingHow to move ahead is the propensity score is kept in the interval between (0.1 and 0.9).. how to cal…
Create pairs within groupsDear Stata supporters, I am currently working on my master thesis and therefore want to use STATA. …
Appending survey dataHi I am working with the World Bank's Enterprise Surveys, and want to append data from different cou…
Setting time variable with an unbalanced panel dataHello, I am working on a project with panel data which is unbalanced. One of the variables is prope…
Bivariate dynamic probit models for panel dataHi all, I am estimating a Bivariate dynamic probit model for panel data. I follow the approach sugg…
Subscribe to:
Post Comments (Atom)
0 Response to Import Excel Loop issues
Post a Comment