I want to export the "auto" file in several Excel's sheets (one per brand).
Code:
sysuse auto, clear * brand generate splitat = strpos(make," ") gen brands=substr(make,1,splitat-1) gen models=substr(make,splitat+1,10) * export levelsof brands, local(brand) foreach brands in `brand' { export excel using "c:\sysuse_by_brand.xlsx", firstrow(variables) sheet(`brand') sheetreplace }
Thanks for your help !
0 Response to Multiple sheets export excel
Post a Comment