first of all, define areas in EXCEL under Name Manager, then you can treat them as SAS table in a SAS library. The following is an example.
This piece of code can be used in a Macro to do repeated reports automation.
Hope it helps a little bit.
libname pcn_rep pcfiles path="&path_results.\&file_name." unicode=yes;
/*******************************************************************************************/
proc sql;
drop table pcn_rep.treaty;
drop table pcn_rep.nontreaty;
drop table pcn_rep.physician_list;
drop table pcn_rep.treaty_cut;
drop table pcn_rep.non_treaty_cut;
quit;
data pcn_rep.treaty;
set treaty;
run;
data pcn_rep.nontreaty;
set nontreaty;
run;
data pcn_rep.physician_list;
set physician_list;
run;
data pcn_rep.treaty_cut;
set treaty_cut;
run;
data pcn_rep.non_treaty_cut;
set non_treaty_cut;
run;
libname pcn_rep clear;
|