Hi everyone
ı deeply searched about my problem but ı couldnt find a solution.
Here is my problem about importing from excel.
ı have 21 sectors and 132 monthly excel files. I want to import for every sector(j) with different cell range. cell range begins with cellrange(A15:I19) for the first sector and row increases by 7, column increases by 7. but ı cant put these increasing cell ranges to loop.
First sector j=1 cellrange(A15:I19)
Second sector j=2 cellrange(A22:I26)
forval j= 1/21{
forval i= 1/132{
import excel using C:\Users\a`i'.xls, sheet(blabla) cellrange(A15:I19) clear
gen sectorid = `j'
gen time = `i'
save s`j'`i'.dta,replace
}
}
thanks for your kindly response.
Related Posts with Looping increasing cellranges and importing to stata
Problem analyzing outcome by dateHello STATAListers, I'm a new user and having trouble working on a simple dataset with just 5 varia…
fixed effect interaction with many values of FEHi, I am trying to run a specification using reghdfe, where I interact a district indicator (unique…
Obtaining a forest plot showing the standardised mean differences after teffects ipw and aipwDear Statalisters, I have been trying to produce a forest plot-style of graph to show the mean in t…
Using FEI am trying to carry out panel FE analysis using .xtreg. For cluster SE do I need to create a differ…
Endogenous switching model using "etregress"I am trying to estimate the effect of off-farm participation on farm household food insecurity statu…
Subscribe to:
Post Comments (Atom)
0 Response to Looping increasing cellranges and importing to stata
Post a Comment