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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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