DATA Step, Macro, Functions and more

Cannot import excel to SAS

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

Cannot import excel to SAS

[ Edited ]

Hi,

This is Kelly and is my first time to post my question here...

The problem is that I couldn't import my excel to SAS...and I have checked the version of excel and it is excel 2016 64bit(office 365) and my PC is also X64 processor.

The error still shows:" Connect: Class not registered. Error in the LIBNAME statement." after I tried most solutions...including installing PC server and SAS re-installation. 

I have done the flowchart for troubleshooting: http://support.sas.com/kb/60/356.html#mdd-connect, and it says I should consult the technical support. Is there any further instruction for solving this problem? Or where should I ask for help? 


Accepted Solutions
Solution
‎05-02-2018 09:21 AM
Frequent Contributor
Posts: 142

Re: Cannot import excel to SAS

have you tried with XLS or XLSX Replace options.

View solution in original post


All Replies
Frequent Contributor
Posts: 142

Re: Cannot import excel to SAS

Hi Kelly,

Can you please post the code that you used for importing excel file.
Occasional Contributor
Posts: 7

Re: Cannot import excel to SAS

PROC IMPORT DATAFILE="d:\icd9.xlsx"
     DBMS=EXCELCS
     OUT=WORK.test REPLACE;
RUN;

I have tried EXCELCS and EXCEL but there are in the same result.

Solution
‎05-02-2018 09:21 AM
Frequent Contributor
Posts: 142

Re: Cannot import excel to SAS

have you tried with XLS or XLSX Replace options.

Occasional Contributor
Posts: 7

Re: Cannot import excel to SAS

Thanks for your great help! It works since I changed DBMS=excel to xlsx... However, I still can't use import wizard to import my excel data...It seems that I should import them manually QQ
Frequent Contributor
Posts: 142

Re: Cannot import excel to SAS

You are welcome!  code always should work across versions. Is importing through wizard is failing? in that case we have to see the excel versions its supporting through  wizard.

Occasional Contributor
Posts: 7

Re: Cannot import excel to SAS

It still doesn't work with the import wizard. My SAS version is 9.4, and my excel version is 64-bit 2016 office365(provided from my school...)
Contributor
Posts: 36

Re: Cannot import excel to SAS

options validvarname=any;
proc import out = multi 
	datafile = "test.xlsx" 
	dbms = xlsx  
	replace;    
	getnames = Yes; 
run;
Occasional Contributor
Posts: 7

Re: Cannot import excel to SAS

Posted in reply to emrancaan
It's also a great solution. Thanks a lot!
☑ This topic is solved.

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

Discussion stats
  • 8 replies
  • 230 views
  • 2 likes
  • 3 in conversation