BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
daoud_028
Fluorite | Level 6

i am using below code in university sas studio university edition 

/* exporting data into excel */
/* this program giving error */

 

/* exporting data into excel */
/* this program giving error  */

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

data xlout.Asiacars;
    set sashelp.cars;
    where origin='Asia';
run;

proc means data=sashelp.cars noprint maxdec=1;
    where type="SUV";
    var  Horsepower ;
    class Model;
    ways 1;
    output out=xlout.carinfo  mean= Length max= Cylinders;
run;

libname xlout clear;

Logs Error:

76         
 77         libname xlout xlsx "&outpath/cars.xlsx";
 WARNING: Apparent symbolic reference OUTPATH not resolved.
 NOTE: Libref XLOUT was successfully assigned as follows: 
       Engine:        XLSX 
       Physical Name: &outpath/cars.xlsx
 78         
 79         data xlout.Asiacars;
 80             set sashelp.cars;
 81             where origin='Asia';
 82         run;
 
 ERROR: Temporary file for XLSX file can not be created -> &outpath//cars.$$1.  Make sure the path name is correct and that you have 
 write permission.
 ERROR: File XLOUT.Asiacars.DATA does not exist.
 NOTE: The SAS System stopped processing this step because of errors.
 WARNING: The data set XLOUT.Asiacars was only partially opened and will not be saved.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 
 83         
 84         proc means data=sashelp.cars noprint maxdec=1;
 85             where type="SUV";
 86             var  Horsepower ;
 87             class Model;
 88             ways 1;
 89             output out=xlout.carinfo  mean= Length max= Cylinders;
 90         run;
 
 ERROR: Temporary file for XLSX file can not be created -> &outpath//cars.$$1.  Make sure the path name is correct and that you have 
 write permission.
 ERROR: File XLOUT.carinfo.DATA does not exist.
 NOTE: The SAS System stopped processing this step because of errors.
 WARNING: The data set XLOUT.carinfo was only partially opened and will not be saved.
 NOTE: PROCEDURE MEANS used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
       
 91         
 92         libname xlout clear;
 NOTE: Libref XLOUT has been deassigned.
 93         
 94         

 

1 ACCEPTED SOLUTION

Accepted Solutions
tarheel13
Rhodochrosite | Level 12
&outpath is a macro variable. Did you assign it anywhere?

View solution in original post

1 REPLY 1
tarheel13
Rhodochrosite | Level 12
&outpath is a macro variable. Did you assign it anywhere?

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1304 views
  • 1 like
  • 2 in conversation