Help using Base SAS procedures

PROC EXPORT DBMS=EXCEL

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 93
Accepted Solution

PROC EXPORT DBMS=EXCEL

 

My version of SAS is base SAS 9.2

Windows 7 64 bit

Office Excel 2013 32-bit

 SAS/ACCESS to PC Files is installed

 

 

This code use to work correctly but now I am getting error

 


ERROR: Connect: Unexpected error from external database driver (1).
ERROR: Error in the LIBNAME statement.

 

 

proc export data=dt.volumeEntity3 outfile='D:\SAS\workplan\output_crosssell.xls' dbms=excel replace;
run;

 

 


Accepted Solutions
Solution
‎12-11-2017 12:55 AM
Frequent Contributor
Posts: 93

Re: PROC EXPORT DBMS=EXCEL

The issue is resolved after the recently downloading the new Microsoft Update.

View solution in original post


All Replies
Valued Guide
Posts: 582

Re: PROC EXPORT DBMS=EXCEL

Please post full log, especially with the libname statement for "dt".

Super User
Super User
Posts: 9,606

Re: PROC EXPORT DBMS=EXCEL

Whilst this is not your issue (from what I can tell from the brief bit posted) as your issue relates to the libname you haven't supplied, in your code you state output file is .xls - xls is a file extension for < 2003 Excel, it is the old binary file format.  dsbms=excel should create .xlsx files, or Open Office file format, so ensure the file extension matches the file type.  Shouldn't matter in this case, but might switch the engine if your not careful, and anyone using the file will be thrown off by the mismatch.

Frequent Contributor
Posts: 93

Re: PROC EXPORT DBMS=EXCEL

[ Edited ]

Which libname shoud I supply?

libname dt 'd:\sas\dt';

It is working. It is a local folder.

And this code used to work before.Suddenly it  stopped working.

Super User
Super User
Posts: 9,606

Re: PROC EXPORT DBMS=EXCEL

Actually, a quick search shows it seems to be a Microsoft issue:

https://blogs.msdn.microsoft.com/dataaccesstechnologies/2017/10/18/unexpected-error-from-external-da...

 

As I mentioned before with the filename, use the correct file extension and this should solve it, if not follow m$ advice:

proc export data=dt.volumeEntity3 outfile='D:\SAS\workplan\output_crosssell.xlsx' dbms=excel replace;
run;

 

Solution
‎12-11-2017 12:55 AM
Frequent Contributor
Posts: 93

Re: PROC EXPORT DBMS=EXCEL

The issue is resolved after the recently downloading the new Microsoft Update.
☑ This topic is solved.

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

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