<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ODS Excel Chart Out of Scale/Distorted in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/ODS-Excel-Chart-Out-of-Scale-Distorted/m-p/246992#M8954</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran the code from the blog post "Experimenting with ODS EXCEL to create spreadsheets from SAS," In excel, the chart is out of scale/distorted.&amp;nbsp;I'm running SAS 9.4 (TS1M2).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I opened the excel document, right clicked on the image, and saw that, while the original size height and width match the ods graphics options,&amp;nbsp;the scale height and scale width are set to 98% and 69%, respectively (image below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know why this is happening or how to fix the scale?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS code from&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2014/08/29/experimenting-with-ods-excel-to-create-spreadsheets-from-sas/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2014/08/29/experimenting-with-ods-excel-to-create-spreadsheets-from-sas/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran it with and without the ods graphics options, with similar results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="c:\projects\output\example.xlsx" 
 /* will apply an appearance style */
 style=pearl
 options(
  /* for multiple procs/sheet */
  sheet_interval="none" 
  /* name the sheet tab */
  sheet_name="CARS summary"
 );
 
/* add some formatted text */
ods escapechar='~';
ods text="~S={font_size=14pt font_weight=bold}~Cars Summary and Histogram";
 
/* tabular output */
proc means data=sashelp.cars;
var msrp invoice;
run;
 
/* and a graph */
ods graphics / height=400 width=800 noborder;
proc sgplot data=sashelp.cars;
histogram msrp;
run;
 
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scale height and scale width are set to 98% and 69%, respectively.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1682i0DC83148EEF249EC/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michelle&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jan 2016 21:41:39 GMT</pubDate>
    <dc:creator>michellekorm</dc:creator>
    <dc:date>2016-01-29T21:41:39Z</dc:date>
    <item>
      <title>ODS Excel Chart Out of Scale/Distorted</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-Excel-Chart-Out-of-Scale-Distorted/m-p/246992#M8954</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran the code from the blog post "Experimenting with ODS EXCEL to create spreadsheets from SAS," In excel, the chart is out of scale/distorted.&amp;nbsp;I'm running SAS 9.4 (TS1M2).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I opened the excel document, right clicked on the image, and saw that, while the original size height and width match the ods graphics options,&amp;nbsp;the scale height and scale width are set to 98% and 69%, respectively (image below).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know why this is happening or how to fix the scale?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS code from&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2014/08/29/experimenting-with-ods-excel-to-create-spreadsheets-from-sas/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2014/08/29/experimenting-with-ods-excel-to-create-spreadsheets-from-sas/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I ran it with and without the ods graphics options, with similar results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="c:\projects\output\example.xlsx" 
 /* will apply an appearance style */
 style=pearl
 options(
  /* for multiple procs/sheet */
  sheet_interval="none" 
  /* name the sheet tab */
  sheet_name="CARS summary"
 );
 
/* add some formatted text */
ods escapechar='~';
ods text="~S={font_size=14pt font_weight=bold}~Cars Summary and Histogram";
 
/* tabular output */
proc means data=sashelp.cars;
var msrp invoice;
run;
 
/* and a graph */
ods graphics / height=400 width=800 noborder;
proc sgplot data=sashelp.cars;
histogram msrp;
run;
 
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Scale height and scale width are set to 98% and 69%, respectively.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/1682i0DC83148EEF249EC/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michelle&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 21:41:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-Excel-Chart-Out-of-Scale-Distorted/m-p/246992#M8954</guid>
      <dc:creator>michellekorm</dc:creator>
      <dc:date>2016-01-29T21:41:39Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel Chart Out of Scale/Distorted</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/ODS-Excel-Chart-Out-of-Scale-Distorted/m-p/249269#M9052</link>
      <description>&lt;P&gt;I contacted SAS Technical Support. We found two workarounds for this issue.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. The SAS workaround is to&amp;nbsp;&lt;SPAN&gt;set the absolute_column_width value in the ods excel options. Setting style=pearl and absolute_column_width="11.7" results in an image with close to 100% scale width in excel. However, setting style=journal requires absolute_column_width="10.75" to produce an image with 100% scale width in Excel.&amp;nbsp;&lt;/SPAN&gt;You must include a non-graph table and a graph&amp;nbsp;in the same worksheet in order for the&amp;nbsp;absolute_column_width option to&amp;nbsp;have an effect on the default size/scaling of the graph. &amp;nbsp;If the worksheet *only*&amp;nbsp;includes graph output, then the &amp;nbsp;absolute_column_width &amp;nbsp;does not have any effect on the default size/scaling of the graph.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="c:\projects\output\example.xlsx" 
 /* will apply an appearance style */
 style=pearl
 options(
  /* for multiple procs/sheet */
  sheet_interval="none" 
  /* name the sheet tab */
  sheet_name="CARS summary"
  absolute_column_width="11.5"
 );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;2. The Excel workaround is to right click on the image to format the picture, and under size properties click the "reset" button. You can use&amp;nbsp;Excel VBA to scale the picture if you have multiple affected images and/or worksheets.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Feb 2016 17:42:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/ODS-Excel-Chart-Out-of-Scale-Distorted/m-p/249269#M9052</guid>
      <dc:creator>michellekorm</dc:creator>
      <dc:date>2016-02-10T17:42:13Z</dc:date>
    </item>
  </channel>
</rss>

