DATA Step, Macro, Functions and more

Export excel XLS

Accepted Solution Solved
Reply
Learner
Posts: 1
Accepted Solution

Export excel XLS

Bonjour.

J'ai une macro excel capricieuse qui exige en input un fichier excel en format XLS.

Dans un programme SAS j'ai insérer ce code:

PROC EXPORT
DATA= DONNEES
DBMS=EXCEL
OUTFILE= "C:\Temp\test1.xls"
OUTTABLE='TEST'
REPLACE;
RUN;

 

et j'obtiens ce message d'erreur:

PROC EXPORT
34 DATA= DONNEES
35 DBMS=EXCEL
36 OUTFILE= "C:\Temp\test1.xls"
37 OUTTABLE='TEST'
38 REPLACE;
ERROR: Cannot specify both FILE= and TABLE=.
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


Accepted Solutions
Solution
yesterday
Super User
Posts: 23,683

Re: Export excel XLS

Remove the OUTTABLE=, it is only used for Microsoft Access tables.

 

ERROR: Cannot specify both FILE= and TABLE=.

PROC EXPORT
DATA= DONNEES /*data to be exported*/
OUTFILE= "C:\Temp\test1.xls" /*name of file to be created*/
DBMS=EXCEL /*type of file to be created*/
REPLACE; /*indicates that if it already exists to overwrite the output*/
RUN;

 


@bilst01 wrote:

Bonjour.

J'ai une macro excel capricieuse qui exige en input un fichier excel en format XLS.

Dans un programme SAS j'ai insérer ce code:

PROC EXPORT
DATA= DONNEES
DBMS=EXCEL
OUTFILE= "C:\Temp\test1.xls"
OUTTABLE='TEST'
REPLACE;
RUN;

 

et j'obtiens ce message d'erreur:

PROC EXPORT
34 DATA= DONNEES
35 DBMS=EXCEL
36 OUTFILE= "C:\Temp\test1.xls"
37 OUTTABLE='TEST'
38 REPLACE;
ERROR: Cannot specify both FILE= and TABLE=.
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


 

View solution in original post


All Replies
Solution
yesterday
Super User
Posts: 23,683

Re: Export excel XLS

Remove the OUTTABLE=, it is only used for Microsoft Access tables.

 

ERROR: Cannot specify both FILE= and TABLE=.

PROC EXPORT
DATA= DONNEES /*data to be exported*/
OUTFILE= "C:\Temp\test1.xls" /*name of file to be created*/
DBMS=EXCEL /*type of file to be created*/
REPLACE; /*indicates that if it already exists to overwrite the output*/
RUN;

 


@bilst01 wrote:

Bonjour.

J'ai une macro excel capricieuse qui exige en input un fichier excel en format XLS.

Dans un programme SAS j'ai insérer ce code:

PROC EXPORT
DATA= DONNEES
DBMS=EXCEL
OUTFILE= "C:\Temp\test1.xls"
OUTTABLE='TEST'
REPLACE;
RUN;

 

et j'obtiens ce message d'erreur:

PROC EXPORT
34 DATA= DONNEES
35 DBMS=EXCEL
36 OUTFILE= "C:\Temp\test1.xls"
37 OUTTABLE='TEST'
38 REPLACE;
ERROR: Cannot specify both FILE= and TABLE=.
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


 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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