BookmarkSubscribeRSS Feed
kate8987
Calcite | Level 5

Hey ,

 

I have a little problem. I want to export data from sas to excel through ods statement but it doesn't work. An error message diplays. Anyboby can help me ?

 

code:

ods excel file="‪C:\sasTestRapport\Classeur16.xlsx" 
options(sheet_name="Feuil3" );



proc print data= work._PRODSAVAIL;
var name;
run;

ods excel close;

 

thank you

 

kate 🙂

10 REPLIES 10
andreas_lds
Jade | Level 19

Please show the log including the error message. Posting it using {i}-icon is recommended.

kate8987
Calcite | Level 5

hello andreas_lds,

 

no log only the error message you can see in my segond post?

 

thank you

 

Kate

kate8987
Calcite | Level 5

i have the same error message with this code 

 

proc export data=work._PRODSAVAIL dbms=excel

outfile="‪C:\sasTestRapport\Classeur16.xlsx";

run;
Kurt_Bremser
Super User

You have an invisible UTF character in your filename string:

6f 75 74 66 69 6c 65 3d 22 e2 80 aa 43 3a 5c 73
 o  u  t  f  i  l  e  =  "           C  :  \  s

The sequence e280aa can't be translated to the wlatin1 encoding your SAS server session uses. Retype the filename.

kate8987
Calcite | Level 5

thank you for your response. Now i have this message :

 

ERROR: Physical file does not exist, C:\sasTestRapport\Classeur16.xlsx.

Kurt_Bremser
Super User

Note that if you work with Enterprise Guide and use a remote workspace server, that server does not have access to your desktop's C: drive.

kate8987
Calcite | Level 5

in fact i have changed the path file  with the good one

 

\\T39PP\f_ev\ECR\_ires privés\mir\Classeur2.xlsx

 

.... and it still doesn't work .. i think i don't  have permission . What do you think about this idea?

 

Thank you

 

Kate

ballardw
Super User

@kate8987 wrote:

in fact i have changed the path file  with the good one

 

\\T39PP\f_ev\ECR\_ires privés\mir\Classeur2.xlsx

 

.... and it still doesn't work .. i think i don't  have permission . What do you think about this idea?

 

Thank you

 

Kate


I have the luxury of not having to deal with non-English SAS environment. The use of characters other than the non-accented and such A-Z a-z and _ in paths is generally a good idea. If you have permissions I would try \\T39PP\f_ev\ECR\Classeur2.xlsx and see if that might work.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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
  • 10 replies
  • 6438 views
  • 2 likes
  • 4 in conversation