08-07-2015 03:17 PM
I am working with ODS Excel to build an Excel Workbook that will act like a scorecard. My problem is I need the graphic output to be a certain size in excel, but when it renders in Excel it defaults to 6.61 inches wide. Has anyone encountered this? Below is basically my code that I am using but very dummied down and using sashelp dataset.
proc sort; by sex;
ods listing close;
ODS EXCEL file="test.xlsx" ;
ods excel options(sheet_name="Performance"
define statgraph barchart ;
begingraph / designwidth=11in designheight=9in ;
layout lattice / columns = 4 rows = 2 ;
%do i = 1 %to 8;
layout overlay/ ;
seriesplot x=sex y= weight / display=all lineattrs=(color=black pattern=solid) markerattrs= (symbol=circlefilled) legendlabel="ConversionRatio" name= "ser" ;
proc sgrender data=class template=barchart;
Thanks for any help on this
08-07-2015 03:50 PM
Have you tried anything like:
ods graphics / height=4in width=3in;
before any procedure that produces output?
You may also want to consider scale=off if text in the graph gets too big or small.
08-07-2015 04:00 PM
I tried using the ods graphic options, but it still downsizes compared to the 11 or 12 inch width I am trying to accomplish. When I put in above 12 inch width I get the below warning.
WARNING: WIDTH exceeds available space for EXCEL destination. Setting WIDTH=1.09375in.
So does ODS Excel put a limit on the size of graphic it is rendering?