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;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.