How to read multiple excel sheets from a single excel file
at once????
Answer Posted / lucylu
%macro read_moresheets(ifile, lib);
libname ixls excel &ifile;
proc sql;
select memname into :ds1 - :ds100
from sashelp.vtable
where libname = "IXLS" and index(memname,'$') = 0
;
quit;
%put _user_;
%do i = 1 %to &sqlobs;
data &lib..&&ds&i;
set ixls.&&ds&i;
run;
%end;
%mend;
%read_moresheets("C:\Ongoing\CallActivity.xls", work);
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
where to use sas business intelligence? : Sas-bi
what are sas/access and sas/connect? : Sas programming
Can you execute a macro within a macro? Describe. : sas-macro
What is the maximum and minimum length of macro variable
Name types of category in which SAS Informats are placed?
How to create list output for cross-tabulations in proc freq?
what cause the "error: connect:" and "error in the libname statement" when there weren't any such problems?
Intern stastical programmer written test
What are the automatic variables for macro? : sas-macro
If money were no object, what would you like to do?
Have you ever used the SAS Debugger?
what are validation tools that are used in sas? : Sas-administrator
What is the use of %include statement?
What is the maximum length of the macro variable? : sas-macro
what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming