Hi,
I have a excel sheet with four worksheets.
How can i achieve importing this using proc import
I tried giving as
'sheet $'n
but i did not work
and also i need to make one cell in the imported excel sheet as dynamic,so that when i run the macro the value needs to get updated
Help me in this..
PROC IMPORT OUT= TEST
DATAFILE= "C:\Documents and Settings\Test.xls"
DBMS=excel REPLACE;
SHEET="Sheet1";
RUN;
PROC IMPORT OUT= TEST1
DATAFILE= "C:\Documents and Settings\Test.xls"
DBMS=excel REPLACE;
SHEET="Sheet2";
RUN;
Log:
32 PROC IMPORT OUT= TEST
33 DATAFILE= "C:\Documents and Settings\nbk8gia\My Documents\My SAS
33 ! Files\Test.xls"
34 DBMS=excel REPLACE;
35 SHEET="Sheet1";
36 RUN;
NOTE: WORK.TEST data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 3.06 seconds
cpu time 0.79 seconds
37
38 PROC IMPORT OUT= TEST1
39 DATAFILE= "C:\Documents and Settings\nbk8gia\My Documents\My SAS
39 ! Files\Test.xls"
40 DBMS=excel REPLACE;
41 SHEET="Sheet2";
42 RUN;
NOTE: WORK.TEST1 data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 3.18 seconds
cpu time 0.84 seconds
Hi:
It seems unlikely that this is an ODS question. PROC IMPORT is NOT one of the SAS Reporting procedures and, in addition, PROC IMPORT does NOT use ODS at all in the import process.
Your best bet for help would be to post your question to either the SAS PROCEDURES forum (http://communities.sas.com/community/sas_procedures) or the SAS Macro forum (since you mentioned making something dynamic) -- (http://communities.sas.com/community/sas_macro_facility_data_step_and_sas_language_elements) since it is generally a macro program that makes programs more dynamic.
It would also be useful if you posted your PROC IMPORT code and described where or how you need to have the program create variables dynamically.
cynthia
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.