DATA Step, Macro, Functions and more

PROC import

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

PROC import

Please post any example code for impoting XLSX type of file using Proc import syntax.


Accepted Solutions
Solution
‎03-09-2017 01:11 PM
Super User
Posts: 17,826

Re: PROC import

What version of SAS do you have?

 

You may not have a license to import/export SAS files either, it requires SAS ACCESS to PCFILES I believe.

 

Try running the following to see if it lists SAS Access in the listing. If you post the output to here, make sure to remove your Site number.

proc setinit; run;

proc product_status; run;

 

 

View solution in original post


All Replies
Super User
Posts: 17,826

Re: PROC import

proc import out=want datafile='/folders/myfolders/myfile.xlsx' dbms=xlsx replace; run;
Occasional Contributor
Posts: 15

Re: PROC import

Thanks for your reply...

 

Code i submitted--->

proc import
datafile="E:\SAS\SAS_Total\practice programs\proc_import.xlsx"
out=importingxl dbms=xlsx replace;
run;

 

log---->

proc import
 datafile="E:\SAS\SAS_Total\practice programs\proc_import.xlsx"

out=importingxl dbms=xlsx replace;
ERROR: DBMS type XLSX not valid for import.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE IMPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds

 

Can you please spot what's wrong

Solution
‎03-09-2017 01:11 PM
Super User
Posts: 17,826

Re: PROC import

What version of SAS do you have?

 

You may not have a license to import/export SAS files either, it requires SAS ACCESS to PCFILES I believe.

 

Try running the following to see if it lists SAS Access in the listing. If you post the output to here, make sure to remove your Site number.

proc setinit; run;

proc product_status; run;

 

 

Occasional Contributor
Posts: 15

Re: PROC import

Thanks!!!!

 

 

Occasional Contributor
Posts: 11

Re: PROC import

Hi,

I want to know that if i have data in excel file and i want to get only selected data out of it to make a dataset so can we use where statement in proc import. ?

if not then how can i import selected data out of excel file ?

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 184 views
  • 0 likes
  • 3 in conversation