BookmarkSubscribeRSS Feed
biringstad
Calcite | Level 5

I am trying to export multiple sas datasets (gbotall, vabotall, vxrall) into one sheet each in one xlsx file (wiodvatrd), but I receive the error:

ERROR: FILE= or TABLE= is required and must be specified.

 

I am using the SAS University Edition. So far I have tried with different codes, and below is one of them and parts its log. Do anyone see what I am doing wrong?

 

Code:

PROC EXPORT DATA= myfolder.GBOTall DBMS=xlsx replace;

sheet= "gbotall";
OUTFILE= "/folders/myfolders/WIODVATRD.xlsx";
RUN;

 

PROC EXPORT DATA= myfolder.VABOTall DBMS=xlsx replace;
sheet= "vabotall";
OUTFILE= "/folders/myfolders/WIODVATRD.xlsx";
RUN;

 

PROC EXPORT DATA= myfolder.vxrall dbms=xlsx replace;
sheet= "vxrall";
OUTFILE= "/folders/myfolders/WIODVATRD.xlsx";
RUN;

  

Log:


 1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 55        
 56         PROC EXPORT DATA= myfolder.GBOTall DBMS=xlsx replace;
 ERROR: FILE= or TABLE= is required and must be specified.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: PROCEDURE EXPORT used (Total process time):
       real time           0.00 seconds
       cpu time            0.00 seconds
      
 57         sheet= "gbotall";
 58         OUTFILE= "/folders/myfolders/WIODVATRD.xlsx";
 59         RUN;
 60 

 

Best regards,

Birgitte

1 REPLY 1
Reeza
Super User

Outfile belongs on the proc export statement. You have it as its own right now. 

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 810 views
  • 0 likes
  • 2 in conversation