dear SAS experts,
using the following code:
proc sql;
create table docsref.Adresses_contacts as
select '' as Numero,
'FR' as LKZ,
PLZ,
ORT,
Clubs,
Anrede,
Vorname,
Nachname,
Funktion,
adresse_str_,
Tel_Fix,
Tel_Handy,
Email,
Website,
TYP,
KETTE,
Notiz,
R,
Stammart,
_2__email_adresse
from adresses_corr
order by PLZ;
quit;
run;
proc export data=docsref.Adresses_contacts
outfile=Adresses_contacts
DBMS=xlsx;
putnames=yes;
run;
I've got the error message:
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 proc sql;
74 create table docsref.Adresses_contacts as
75 select '' as Numero,
76 'FR' as LKZ,
77 PLZ,
78 ORT,
79 Clubs,
80 Anrede,
81 Vorname,
82 Nachname,
83 Funktion,
84 adresse_str_,
85 Tel_Fix,
86 Tel_Handy,
87 Email,
88 Website,
89 TYP,
90 KETTE,
91 Notiz,
92 R,
93 Stammart,
94 _2__email_adresse
95 from adresses_corr
96 order by PLZ;
NOTE: Table DOCSREF.ADRESSES_CONTACTS created, with 1878 rows and 20 columns.
97 quit;
NOTE: PROCEDURE SQL a utilisé (Durée totale du traitement) :
real time 0.38 seconds
cpu time 0.43 seconds
98 run;
99
100 proc export data=docsref.Adresses_contacts
101 outfile=Adresses_contacts
102 DBMS=xlsx;
103 putnames=yes;
104 run;
Error creating temporary file for XLSX file -> /opt/sasinside/SASConfig/Lev1/SASApp//ADRESSES_CONTACTS.$$1 . It is either not an
Excel spreadsheet or it is damaged. Error code=8000101D
Requested Output File is Invalid
ERROR: Export unsuccessful. See SAS Log for details.
NOTE: The SAS System stopped processing this step because of errors.
How could I correct this?
outfile=Adresses_contacts
You need to use, in quotes, the actual full path name and file name of the Excel file you want to create. File names end with .XLSX, which you don't have (I don't really know if it works without the .XLSX, as I have never tried it that way).
outfile=Adresses_contacts
You need to use, in quotes, the actual full path name and file name of the Excel file you want to create. File names end with .XLSX, which you don't have (I don't really know if it works without the .XLSX, as I have never tried it that way).
You need to supply a valid physical filename or a valid file reference (fileref) to the OUTFILE= option of the PROC EXPORT statement.
Since you seem to be using University Edition, that path would be (as you learned when studying the instructions, and you did study them, didn't you?)
"/folders/myfolders/Adresses_contacts.xlsx"
as you have to write that file to the shared folder of UE.
actually, the export as .xlsx didn't work at all (after I gave the path name correctly). Same error as quoted before).
I tried to modify for .csv and csv-Type, and it worked better.
See this log example:
73 proc export 74 data=sashelp.class 75 outfile='/folders/myfolders/class.xlsx' 76 dbms=xlsx 77 replace 78 ; 79 putnames=yes; 80 run; NOTE: The export data set has 19 observations and 5 variables. NOTE: "/folders/myfolders/class.xlsx" file was successfully created. NOTE: Verwendet wurde: PROZEDUR EXPORT - (Gesamtverarbeitungszeit): real time 0.03 seconds cpu time 0.01 seconds
If that does not give you a good starting point to fix your Excel export, post the log of your failed step.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.