You'll have to modify the libname export, I have to use PCfiles, you may need Excel or EXCELCS depending on your setup. First I prep the template (attached). Second, I prep the data. Three. Copy the template to export to. Four. Export. *prep data; proc sort data=sashelp.class out=class; by sex; run; %let file_name=Sample2; *If you have x command, I copy my template and rename it for the project at hand; %sysexec copy "C:\Temp\Sample.xlsx" "C:\Temp\&file_name..xlsx"; *Range is called sashelp_class; libname example pcfiles path=""C:\Temp\&file_name..xlsx"; proc sql; drop table example.sashelp_class; quit; data example.sashelp_class; set class; if age<15 then height=height*2; run; libname example;
... View more