Learning SAS? Welcome to the exclusive online community for all SAS learners.

How to Import an Excel File to SAS University Edition

Reply
New Contributor
Posts: 2

How to Import an Excel File to SAS University Edition

I am running below code to import excel file in sas university edition, but I can only see running status and not getting output. Sas also not showing any error. Please solve this problem and suggest solutions. Thanks

 

proc import datafile= "/folders/myfolders/Gift.xls"
dbms=xls out = Gift replace;
getnames = yes;
run;

Super User
Posts: 10,601

Re: How to Import an Excel File to SAS University Edition

I moved your question to the proper community.

"Community Matters" is reserved for questions concerning the working/using of the SAS communities as such.

 

Are you sure that your file is an old-style Excel file (2003 or earlier) and not in fact a .xlsx with the wrong filename extension?

Try to open it with WinZip or 7-zip. If that is possible, use dbms=xlsx. And store such files as .xlsx in the future.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
New Contributor
Posts: 2

Re: How to Import an Excel File to SAS University Edition

Posted in reply to KurtBremser
Thanks Kurt. Glad to share that the problem is solved. Format was xls only.
Actual problem was that one column of the excel sheet had errors. I
rectified that error and now i am able to import. Thanks for your support!!

Super User
Super User
Posts: 9,862

Re: How to Import an Excel File to SAS University Edition

Please mark @KurtBremser's answer as correct to close the thread.

Ask a Question
Discussion stats
  • 3 replies
  • 154 views
  • 0 likes
  • 3 in conversation