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


Please Help Members By Posting Answers For Below Questions

Name any two sas spawners? : sas-grid-administration

767


Name types of category in which SAS Informats are placed?

921


Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?

2146


How do you connect the desktop application to metadata server? : sas-grid-administration

830


How we can create SAS USER DEFINED CODE?

1821


What makes sas stand out to be the best over other data analytics tools?

781


what type of graphs we will create(for 2+years candidates)?

2077


how are numeric and character missing values represented internally? : Sas programming

841


Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?

1673


Explain what is SAS informats?

819


how the sas basic syntax style described? : Sas-administrator

786


why is a stop statement needed for the point=option on a set statement? : Sas programming

809


what is study design in while working with SAS? what are screening variables in SAS?

1898


what is the Population you used in your project, is it ITT or PP?

2439


How to include or exclude specific variables in a data set?

857