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

 Hi guys 

I just wanted to export this graph to the word file, I tried to do it with this code. the code was correct but the graph does not appear in the word file.

ods html file = ' C:\Users\Barkamih\Desktop\fat % ods\ proteina curve1.doc';
proc gplot data=fit;
title1' Lactation curve of milk fat depression ';
	plot pred*time TEST_DAY_PROT_PERCENT*time/overlay;
run;quit;
ods html close;

 kind regards 

 

Ibrahim  

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User
ods rtf file = 'C:\Users\Barkamih\Desktop\fat_ods\proteina_curve1.rtf';

title1' Lactation curve of milk fat depression ';

proc gplot data=fit;
plot pred*time TEST_DAY_PROT_PERCENT*time/overlay;
run;

ods rtf close;

Do NOT use blanks or special characters in file or path names. They are never necessary and only cause confusion and work that can easily be avoided.

View solution in original post

5 REPLIES 5
collinelliot
Barite | Level 11

Use ODS RTF, not HTML.

Kurt_Bremser
Super User

You are not creating a Word document file. You are writing a HTML file that is incorrectly named with a .doc extension.

HTML files do not embed graphics, they contain links to those graphics, and have them loaded separately by the user agent (usually a browser). This means you also have to make sure that the graphics are stored in a way that the link can be resolved when an application opens the HTML. Make proper use of the path= and gpath= options of the ods html statement, and the (url=) suboption for those.

Barkamih
Pyrite | Level 9

this is my path file 

C:\Users\Barkamih\Desktop\fat % ods

could you please write the correct code for this action, because I'm new in sas 

 

best regards 

 

Ibrahim 

Kurt_Bremser
Super User
ods rtf file = 'C:\Users\Barkamih\Desktop\fat_ods\proteina_curve1.rtf';

title1' Lactation curve of milk fat depression ';

proc gplot data=fit;
plot pred*time TEST_DAY_PROT_PERCENT*time/overlay;
run;

ods rtf close;

Do NOT use blanks or special characters in file or path names. They are never necessary and only cause confusion and work that can easily be avoided.

Barkamih
Pyrite | Level 9
Thank you so much
I appreciate that
thank you again
regards

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!

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.

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
  • 5 replies
  • 2548 views
  • 3 likes
  • 3 in conversation