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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.