BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
sb18
Calcite | Level 5

Hello,

 

I am attempting to export data to an excel workbook. However, I am getting an error message in the log that the XLSX file cannot be created. Please help.

 

Here is the code I am using:

 

libname xlout xlsx "&outpath/southpacific.xlsx";

data xlout.South_Pacific;
set pg1.storm_final;
where Basin="SP";
run;

proc means data=pg1.storm_final noprint maxdec=1;
where Basin="SP";
var MaxWindKM;
class Season;
ways 1;
output out=xlout.Season_Stats n=Count mean=AvgMaxWindKM max=StrongestWindKM;
run;

libname xlout clear;

 

Here is the log:

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
SYMBOLGEN: Macro variable _SASWSTEMP_ resolves to /home/u61133731/.sasstudio/.images/8217b036-825d-4a64-8290-d1a79e89e8fa
SYMBOLGEN: Some characters in the above value which were subject to macro quoting have been unquoted for printing.
SYMBOLGEN: Macro variable GRAPHINIT resolves to GOPTIONS RESET=ALL GSFNAME=_GSFNAME;
68
69 libname xlout
SYMBOLGEN: Macro variable OUTPATH resolves to /folders/myfolders/EPG194/output OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK
69 ! xlsx "&outpath/southpacific.xlsx";
NOTE: Libref XLOUT was successfully assigned as follows:
Engine: XLSX
Physical Name: /folders/myfolders/EPG194/output OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK/southpacific.xlsx
70
71 data xlout.South_Pacific;
72 set pg1.storm_final;
73 where Basin="SP";
74 run;
 
ERROR: Temporary file for XLSX file can not be created -> /folders/myfolders/EPG194/output OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK//southpacific.$$1. Make sure the path name is correct and that you have write permission.
ERROR: File XLOUT.South_Pacific.DATA does not exist.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set XLOUT.South_Pacific was only partially opened and will not be saved.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 2486.87k
OS Memory 28764.00k
Timestamp 11/06/2022 09:41:46 PM
Step Count 310 Switch Count 0
Page Faults 0
Page Reclaims 475
Page Swaps 0
Voluntary Context Switches 6
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 0
 
 
75
76 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
SYMBOLGEN: Macro variable GRAPHTERM resolves to GOPTIONS NOACCESSIBLE;
86
 
I have created the outpath macro using:
 
%let outpath=/folders/myfolders/EPG194/output
 
Thanks!!
 
 
 
 
 

 

1 ACCEPTED SOLUTION

Accepted Solutions
sb18
Calcite | Level 5

Thanks! I fixed that but the code still isn't running correctly. The log still takes that the temporary file for XLSX file can not be created.

View solution in original post

4 REPLIES 4
sb18
Calcite | Level 5

Thanks! I fixed that but the code still isn't running correctly. The log still takes that the temporary file for XLSX file can not be created.

tom_grant
SAS Super FREQ

I see this in the log  "/home/u61133731/", which tells me you are using SAS Ondemand for Academics:

 

Your macro variable, outpath should be something like:

 

%let outpath =  /home/u61133731;

if you want to create your excel directly in the Files(home) directory,

 

Or if you have folders under Files(home) like EPG1V2/output it would look like:

%let outpath =  /home/u61133731/EPG1V2/output;

or 

%let outpath =  ~/EPG1V2/output;

 

(hint - you can use ~ to point to your user home directory)

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

LIBNAME 101

Follow along as SAS technical trainer Dominique Weatherspoon expertly answers all your questions about SAS Libraries.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 986 views
  • 0 likes
  • 3 in conversation