<?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 Re: How to insert image in ODS EXCELXP in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-insert-image-in-ODS-EXCELXP/m-p/184975#M6806</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; By Microsoft design, the type of XML that is produced by TAGSETS.EXCELXP does NOT support the inclusion of images. The XML spec is for Excel 2003 and there is no way to put images into the file unless you create the XML file with SAS, open and save the file as an XLSX file or XLS file and then, after you have saved the file to a proprietary Excel format, you can include your image.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; The alternative to this, as you noted is ODS MSOFFICE2K (which makes an HTML file) or ODS MSOFFICE2K_X (which makes an HTML file with some XML embedded). Since HTML supports image insertion, you do have the ability to use images with these HTML files. But you are really "inserting" an image into HTML. An HTML file uses an &amp;lt;IMG&amp;gt; tag to point to the external location of the image. And that doesn't change if you use either of these 2 destinations. If you are familiar with the basic "sandwich" technique of ODS, then you use the same technique with either of these destinations. Instead of:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods tagsets.excelxp file='c:\temp\myreport1.xml';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;... sas code ...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods tagsets.excelxp close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;You would have something like:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods msoffice2k file='c:\temp\myreport2.xls';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;... sas code ...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods msoffice2k close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods tagsets.msoffice2k_x file='c:\temp\myreport3.xls';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;... sas code ...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods tagsets.msoffice2k_x close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Do note that both of the above files are really HTML files. Naming them as .XLS just fools the Windows registry into launching Excel when you click on the file instead of launching a browser.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Or if you have SAS 9.4, you can try the new ODS EXCEL destination, as described here: &lt;A href="http://blogs.sas.com/content/sasdummy/2014/08/29/experimenting-with-ods-excel-to-create-spreadsheets-from-sas/" title="http://blogs.sas.com/content/sasdummy/2014/08/29/experimenting-with-ods-excel-to-create-spreadsheets-from-sas/"&gt;http://blogs.sas.com/content/sasdummy/2014/08/29/experimenting-with-ods-excel-to-create-spreadsheets-from-sas/&lt;/A&gt; in which Chris Hemedinger shows how to insert an histogram into an Excel worksheet created with the new ODS EXCEL destination.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Feb 2015 03:06:28 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2015-02-27T03:06:28Z</dc:date>
    <item>
      <title>How to insert image in ODS EXCELXP</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-insert-image-in-ODS-EXCELXP/m-p/184974#M6805</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;I want to know if there is way to insert image when you use ODS tagset EXCELXP.&lt;/P&gt;&lt;P&gt;I think tagset excelxp will generate xml file which can not incorporate any graph or images and wondering if there is any alterative way to insert image in excel in addition to the table produced. like ods msoffice2k...but not sure how to achieve the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 00:41:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-insert-image-in-ODS-EXCELXP/m-p/184974#M6805</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-02-27T00:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert image in ODS EXCELXP</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-insert-image-in-ODS-EXCELXP/m-p/184975#M6806</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; By Microsoft design, the type of XML that is produced by TAGSETS.EXCELXP does NOT support the inclusion of images. The XML spec is for Excel 2003 and there is no way to put images into the file unless you create the XML file with SAS, open and save the file as an XLSX file or XLS file and then, after you have saved the file to a proprietary Excel format, you can include your image.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; The alternative to this, as you noted is ODS MSOFFICE2K (which makes an HTML file) or ODS MSOFFICE2K_X (which makes an HTML file with some XML embedded). Since HTML supports image insertion, you do have the ability to use images with these HTML files. But you are really "inserting" an image into HTML. An HTML file uses an &amp;lt;IMG&amp;gt; tag to point to the external location of the image. And that doesn't change if you use either of these 2 destinations. If you are familiar with the basic "sandwich" technique of ODS, then you use the same technique with either of these destinations. Instead of:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods tagsets.excelxp file='c:\temp\myreport1.xml';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;... sas code ...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods tagsets.excelxp close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;You would have something like:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods msoffice2k file='c:\temp\myreport2.xls';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;... sas code ...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods msoffice2k close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods tagsets.msoffice2k_x file='c:\temp\myreport3.xls';&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;... sas code ...&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&lt;STRONG&gt;ods tagsets.msoffice2k_x close;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Do note that both of the above files are really HTML files. Naming them as .XLS just fools the Windows registry into launching Excel when you click on the file instead of launching a browser.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Or if you have SAS 9.4, you can try the new ODS EXCEL destination, as described here: &lt;A href="http://blogs.sas.com/content/sasdummy/2014/08/29/experimenting-with-ods-excel-to-create-spreadsheets-from-sas/" title="http://blogs.sas.com/content/sasdummy/2014/08/29/experimenting-with-ods-excel-to-create-spreadsheets-from-sas/"&gt;http://blogs.sas.com/content/sasdummy/2014/08/29/experimenting-with-ods-excel-to-create-spreadsheets-from-sas/&lt;/A&gt; in which Chris Hemedinger shows how to insert an histogram into an Excel worksheet created with the new ODS EXCEL destination.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 03:06:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-insert-image-in-ODS-EXCELXP/m-p/184975#M6806</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2015-02-27T03:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert image in ODS EXCELXP</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-insert-image-in-ODS-EXCELXP/m-p/184976#M6807</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot! very very useful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Feb 2015 04:38:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-insert-image-in-ODS-EXCELXP/m-p/184976#M6807</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-02-27T04:38:58Z</dc:date>
    </item>
  </channel>
</rss>

