How to read multiple excel sheets from a single excel file
at once????
Answers were Sorted based on User's Feedback
Answer / sravan
Using libname statement.
Libname <lib_name> excel 'file_specification';
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / rajesh
First you have to split the excel sheets and write the
program in macros and use the dde triplet.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / paul
we can read by a simple libname access method:
eg:
libname exlbook 'd:\excel file location\file name.xls';
proc copy in=exlbook out=work;
run;
/*here i am coying the entire excel workbook to work library
in sas, so we can get all sheets at a time.
if we use proc import we can import a single sheet at a time
By the above method we can dump all table from a MS-access database or oracle database or any other db.
only we have to change the connection details, i.e.,
excel --> file name with path
access --> db name with path
oracle/any other RDBMS --> user=***, password=****,
path=**** or host=****
another advantage of this method is :
the library will not occupy any memory on hard disc
it only acts as a repository which save memory and
processing time */
Is This Answer Correct ? | 1 Yes | 2 No |
Answer / ashish
%macro pim(sheet);
proc import out= payment
datafile = 'E:SAS DOCprojectCredit Banking.xls'
dbms = Excel;
sheet = "&sheet";
getnames = yes;
run;
%mend piim;
%pim(Customer Acqusition);
%pim(Spend);
%pim(Repayment);
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / 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 |
Mention the category in which sas informats are placed?
what are the softwares and applications that are used most frequently used by sas bi applications developers? : Sas-bi
why only we use SAS? their r many programmin language like SPSS, Oracle... Why SAS?
Why Info School? BUILD YOUR CAREER WITH RIGHT GUIDANCE AND SUPPORT SAS Training in Data Management at InfoSchool Bangalore
data abc; input x y ; cards; 1 2 5 6 7 8 7 8 1 7 5 7 ; run; Proc Freq data=abc; tables x*y / chisq nopercent nocol norow PLCORR; RUN; If we run the code, we have Polychoric Correlation = 0.9054 in the last table. I want to extract this particular entry with the value. Means I will create one dataset in which this value will be stored/extracted. I need your help in coding this. Please help me out.
Describe 5 ways to do a “table lookup” in SAS?
what is sas business intelligence? : Sas-bi
What is SAS? is it a software just for use or we can creat something over there?
How would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable?
explain what is factor analysis? : Sas-administrator
how do you want missing values handled? : Sas programming
What is the maximum and minimum length of macro variable