libname apple 'C:\Users\Documents\Sales.xls';
proc print data = apple.Sales;
where EmpID = '9888' or EmpID = '0177';
run;
libname apple excel 'C:\Users\Documents\Sales.xls';
thank you , but it doesn't work
what is the error message?
Can you try with an xlsx file format?
libname apple XLSX 'C:\Users\Documents\Sales.xlsx';
thank you , but it doesn't work
As I wrote in the other thread, run proc setinit and proc productstatus to verify that ACCESS to PC Files is licensed and installed.
@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.
thank you for your help , i will reply the next week , i have to prepare the midterm
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;
All uses of the excel/xls/xlsx/excelcs engines require that ACCESS to PC Files is licensed and installed.
Thank you so much .
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 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.