Help using Base SAS procedures

Can't export to *.xlsx file

Reply
New Contributor
Posts: 2

Can't export to *.xlsx file

I'm using SAS 9.2 on a 32-bit machine and I'm trying to PROC EXPORT to an existing Excel 2007 file (or a new file for that matter). My co-workers are not having this issue, so there must be some kind of setting on my computer or in SAS that needs to be adjusted.

I've searched this forum as well as GOOGLED key words. I've tried a few things that I thought might work, but I'm stuck. Any help with this would be appreciated.

Here is the log when I try to overwrite the file:
5812 proc export data = FAM_DATA_1
5813 outfile = "&output\E-FAST_&file..xlsx"
5814 dbms = excel replace;
5815 run;

ERROR: Connect: External table is not in the expected format.
ERROR: Error in the LIBNAME statement.
Connection Failed. See log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.46 seconds
cpu time 0.23 seconds


This is what I get when I try to create a new *.xlsx file:
5816 proc export data = FAM_DATA_1
5817 outfile = "&output\test.xlsx"
5818 dbms = excel replace;
5819 run;

ERROR: Connect: Cannot update. Database or object is read-only.
ERROR: Error in the LIBNAME statement.
Connection Failed. See log for details.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.34 seconds
cpu time 0.20 seconds

Thanks,
Scooter
Super Contributor
Super Contributor
Posts: 3,174

Re: Can't export to *.xlsx file

From the SAS support website, using SEARCH:

Problem Note 32455: The EXCEL and XLS engines do not support importing and exporting Microsoft Office 2007 files in SAS® 9.1.3 and SAS® 9.2 Phase 1
http://support.sas.com/kb/32/455.html

Scott Barry
SBBWorks, Inc.
SAS Super FREQ
Posts: 8,868

Re: Can't export to *.xlsx file

Hi:
As this Tech Support note explains:
http://support.sas.com/kb/32/455.html

you must have SAS 9.2 Phase 2 in order to export to the new .XLSX format.

cynthia
New Contributor
Posts: 2

Re: Can't export to *.xlsx file

Posted in reply to Cynthia_sas
Scott & Cynthia,

Thanks for the info.

Still can't explain why my co-workers have no issue when I supposedly have the exact same set-up.

v/r
Scooter
SAS Super FREQ
Posts: 8,868

Re: Can't export to *.xlsx file

Hi:
If you have verified that you and your co-workers are all using SAS 9.2 Phase 2 and they can export to .xlsx files, but you cannot, that is an issue for Tech Support.

To open a track with Tech Support, go to http://support.sas.com/ and in the left-hand navigation pane, click on the link entitled "Submit a Problem". Alternately, you can go directly to the Tech Support Problem Form here:
http://support.sas.com/ctx/supportform/createForm

cynthia
Ask a Question
Discussion stats
  • 4 replies
  • 763 views
  • 0 likes
  • 3 in conversation