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;
Please post full log, especially with the libname statement for "dt".
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.
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.
Actually, a quick search shows it seems to be a Microsoft issue:
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;
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.