BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello all,
I am having a heck of a time getting quality output from SAS/GRAPH and importing that into Word. I've tried various drivers, ODS for RTF, and the stuff mentioned in TS674 and it's still not as nice as what can be generated in native MS Excel. My biggest issue is with the fonts. They come out resembling something that my line printer/dot matrix used to generate. All I want is to generate a graph and then import it into WORD, sometimes as a stand alone page, sometimes within a document. When I generate the output in PDF it's fantastic but as far as I know, you can't import PDF directly into Word.

Since I'm new to this graphing stuff, please let me know what combinations have worked for you! As reference, I'm using SAS 9.1.3 SP4 and WORD 2002.

Thank you so much

Paula
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Paula:
I think that the ACTXIMG driver output looks good in Word, if you are using RTF. If you use any of the CGM drivers, you may have to install some import filter in Word.

Basically, it's try and see what works best for you. You can also explore the FONTREG procedure and get yourself to the point where you can use TrueType fonts in your output -- that may also improve the way the output looks. But try the ACTXIMG driver first.
cynthia

(Here's a utility macro program that will let you compare ACTXIMG with all the other RTF-friendly drivers.)

[pre]
%macro testgraf(drive=, fname=);
options nomlogic nosymbolgen;
ods rtf file="&fname..rtf" style=analysis;

%if &drive = actximg %then %do;
%let tl ='Actximg driver uses style template colors';
%end;
%else %do;
%let tl = "&drive driver uses goptions colors";
%end;

goptions reset=all device=&drive;
proc gchart data=sashelp.shoes;
title &tl;
where region in ('Asia', 'Pacific', 'Canada');
vbar3d region /sumvar=sales type=mean
name="&fname";
run;
quit;
title;
ods rtf close;
%mend testgraf;

%testgraf(drive=actximg, fname=actximg);
run;

%testgraf(drive=emf, fname=emf);
run;

%testgraf(drive=png, fname=png);
run;

%testgraf(drive=cgm, fname=cgm);
run;

%testgraf(drive=CGMOFML, fname=CGMOFML);
run;

%testgraf(drive=CGMOFMP, fname=CGMOFMP);
run;
[/pre]
Bill
Quartz | Level 8
I use the png driver and some sizing options for a gslide that goes to powerpoint. I just tried it in word and that works too. This can also be done for a graph. Code below. To get it into word, use Insert, Object, Create from File ...


goptions reset=all
dev=png
display
rotate=landscape
ftext="helvetica"
htext=2.0
;
goptions xmax=6in ymax=3.5in xpixels=1800 ypixels=1050;

filename grf1 '\\technology\qualsysshare\groupspecific\reportsmonthly\reapcovr.png';

proc gslide frame lframe=14 wframe=20 cframe=steel;
note h=4;
note h=8 j=c "PRODUCT QUALITY REPORT";
note h=2;
note h=4 j=c 'for Company INC.';
note h=2;
note h=28 j=c c=red 'Diverts';
note h=2;
note h=6 j=c "To end of &mnthyr";
note h=3;
note h=2 j=c 'Prepared by';
note h=2;
note h=3 j=c 'JDA';
note h=3 j=c 'WD';
note h=2;
note h=3 j=c 'Quality Systems';
note h=3 j=c 'Company INC.';
note h=3 j=c "&sysdate";
run;

quit;

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!

Discussion stats
  • 2 replies
  • 822 views
  • 0 likes
  • 3 in conversation