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
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.