BookmarkSubscribeRSS Feed
tianerhu
Pyrite | Level 9
libname apple    'C:\Users\Documents\Sales.xls';

proc print  data = apple.Sales;
   where EmpID = '9888' or EmpID = '0177';

run;

10 REPLIES 10
ghosh
Barite | Level 11
libname apple excel   'C:\Users\Documents\Sales.xls';
ghosh
Barite | Level 11

what is the error message?

 

Can you try with an xlsx file format?

 

libname apple XLSX   'C:\Users\Documents\Sales.xlsx';
ballardw
Super User

@tianerhu wrote:

thank you ,  but  it doesn't work


Doesn't work is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

tianerhu
Pyrite | Level 9

thank you for your help , i will reply the next week , i have to prepare the midterm

ed_sas_member
Meteorite | Level 14

Hi @tianerhu 

 

In case you don't have the license mentioned by @Kurt_Bremser , an alternative could be the use of PROC IMPORT:

proc import datafile='C:\Users\Documents\Sales.xls'
		    out=work.Sales /* 'work' or any other library*/
			dbms=xls
			replace;
run;

proc print data = work.Sales; /* 'work' or any other library*/
   where EmpID = '9888' or EmpID = '0177';
run;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 10 replies
  • 819 views
  • 1 like
  • 5 in conversation