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
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.
Use ODS RTF, not HTML.
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.
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
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.
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.
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.