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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2485 views
  • 3 likes
  • 3 in conversation