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 🙂
Please show the log including the error message. Posting it using {i}-icon is recommended.
hello andreas_lds,
no log only the error message you can see in my segond post?
thank you
Kate
i have the same error message with this code
proc export data=work._PRODSAVAIL dbms=excel outfile="C:\sasTestRapport\Classeur16.xlsx"; run;
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.
thank you for your response. Now i have this message :
ERROR: Physical file does not exist, C:\sasTestRapport\Classeur16.xlsx.
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.
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
What is the exact message you get in the log? Please post the whole log of the step, using the {i} button.
And mind that you have a non-standard character in that path. That is always a VERY BAD idea.
@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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.