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

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

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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

1 REPLY 1
Reeza
Super User

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


 

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 1140 views
  • 1 like
  • 2 in conversation