I am trying to import all the sheets in a excel file using libname statement. But getting errors
libname klm ("C:\Documents and Settings\devarayulu.balanagu\Des
ktop\Test.xls");
This statement has created four datasets in libref dsd.
1)Change_status_Rev1$
2)Change_status_Rev2$
3)Template$
4)Template$_FilterDatabase
if we right click on these tables name feild is blank.
Actually what are these datafiles, shall we can use as sas datasets. if so why the following code is not working?
proc print data=klm.Change_status_Rev2;
run;
ERROR: File KLM.Change_status_Rev2.DATA does not exist
Can anyone help?
Hi ,
Try this code:
libname klm excel "C:\Documents and Settings\devarayulu.balanagu\Des
ktop\Test.xls";
Now hopefully u'll get these files in the library klm:
1)Change_status_Rev1$
2)Change_status_Rev2$
3)Template$
4)Template$_FilterDatabase
Next write the proc print statement:
Proc print data = klm."Change_status_Rev1$"n;
run;
Hope this helps.Good luck
Shaheen
Thank you for the answer.
With proc print, i am getting expected output along with junk. How to get rid of junk?
Can you provide your spreadsheet and points out the output junk which you are getting?
What you are getting is the whole content of the Change_status_Rev1 datasheet. You can also specify a range of cells, as follows :
Proc print data = klm.'Change_status_Rev1$A1:E99'n;
run;
PG
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.
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.