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
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.