<?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: ODS Excel - Insert image within cell in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538599#M22440</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you. The unicode work-around is clever although that the symbols are not exactly the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I run into some problems when the variable to which I am comparing is numeric. For example, the code below does not work unless Weight is defined as group or order. In my case, this is not a solution, because I have other group variables with spanrows and I do not want Weight to be spanned. Is there some way to assign Symbol based on a numeric variable that is not order or group variable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ods escapechar='^';
proc report data=sashelp.class;
	column Name Sex Weight Symbol Age ;
	define Symbol/computed;
	/*define Weight/group;*/
	compute Symbol/character length=50;
		if Weight&amp;gt;100 then do;
			Symbol="^{unicode '2642'x}";
			call define(_col_,'style','style={color=red font_face="Arial Unicode MS" font_size=24pt}');
		end;
		else do;
			Symbol="^{unicode '2640'x}";
			call define(_col_,'style','style={color=green font_face="Arial Unicode MS" font_size=24pt}');
		end;
	endcomp;
run;&lt;/PRE&gt;</description>
    <pubDate>Tue, 26 Feb 2019 09:23:02 GMT</pubDate>
    <dc:creator>KonstantinVasil</dc:creator>
    <dc:date>2019-02-26T09:23:02Z</dc:date>
    <item>
      <title>ODS Excel - Insert image within cell</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538263#M22427</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since ODS Excel doesn't support&amp;nbsp;PREIMAGE and POSTIMAGE, I am looking for a simple way to implement image insertion within cell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The paper below discusses solution in "UNIX operating environments via&amp;nbsp;the Java object in the DATA step to post-process a worksheet to which you are adding an image." However, the example is only for Windows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://support.sas.com/resources/papers/proceedings16/SAS5642-2016.pdf" target="_self"&gt;The ODS Excel Destination versus the ODS ExcelXP Tagset &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is there any simple way to insert image within a cell possibly without post-processing?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, insert image depending on Horsepower variable:&lt;/P&gt;&lt;PRE&gt;data temp; set sashelp.cars;
	if make="Audi";
	test=0;
run;

ods excel file= "&amp;amp;excel_export_path."  ;
	proc report data=temp nowd panels=2 SPLIT='{' spanrows;
	  	column ('Test' model Horsepower test);
		Compute test;
			 If Horsepower &amp;gt; 200 then  call define(_col_,"style","style=[preimage=Green.gif]");
			 Else if Horsepower &amp;lt; 200 then call define(_col_,'style',"style=[preimage=Red.gif]");
		endcomp;
	run; 
ods excel close;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 14:05:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538263#M22427</guid>
      <dc:creator>KonstantinVasil</dc:creator>
      <dc:date>2019-02-25T14:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel - Insert image within cell</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538270#M22428</link>
      <description>&lt;P&gt;SAS have provided more functionality with ods excel/tagsets.excelxp, however I don't see it covering all the operation of a third party software anytime soon.&amp;nbsp; Do be aware that unless your setting the background image property of a cell, the image would generally be in a image box, hence not even part of the data.&amp;nbsp;Afraid my advice is not going to change:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Multiple-horizontal-reports-on-same-Excel-sheet/m-p/537744#M22413" target="_blank"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Multiple-horizontal-reports-on-same-Excel-sheet/m-p/537744#M22413&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use specific Excel functionality, learn to create templates and use VBA code.&lt;/P&gt;
&lt;P&gt;If you want to provide good interactive visualizations, use a visualization software - like spotfire, SAS VA, Tableua, PowerBI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 14:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538270#M22428</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2019-02-25T14:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel - Insert image within cell</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538281#M22429</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/189120"&gt;@KonstantinVasil&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What environment do you have, Unix/Linux or Windows?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, As of now ODS Excel can't insert images in cell level directly. If your on Windows environment, then you can try the %Excel_Enhance macro that was mentioned in paper&amp;nbsp;&lt;A href="https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/2174-2018.pdf" target="_self"&gt;Insights from a SAS Technical Support Guy:&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2018/2174-2018.pdf" target="_self"&gt;A Deep Dive into the SAS® ODS Excel Destination.&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also check this &lt;A href="https://blogs.sas.com/content/sgf/2017/02/20/tips-for-using-the-ods-excel-destination/" target="_self"&gt;blog&lt;/A&gt; for other ways to insert image in excel.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 14:44:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538281#M22429</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2019-02-25T14:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel - Insert image within cell</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538310#M22434</link>
      <description>Also, the example you posted looks like it is using RED.GIF and GREEN.GIF to color a cell. There are other ways to do that particular type of traffic lighting without using images. What exactly is it that you want to do? Traffic light with colors? or insert a picture?&lt;BR /&gt;Cynthia</description>
      <pubDate>Mon, 25 Feb 2019 15:56:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538310#M22434</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-02-25T15:56:40Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel - Insert image within cell</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538326#M22435</link>
      <description>&lt;P&gt;The environment is&amp;nbsp;&lt;SPAN&gt;Unix/Linux - as I mentioned in the referenced link there is only example for Windows&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The pictures which I am using aren't only colors but tick and cross traffic light signs - in fact, they are the same that Excel has as Icon Set for conditional formatting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Conditional%2BFormatting%2B1" style="width: 252px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27416i7B33E0C47443B8FB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Conditional%2BFormatting%2B1" alt="Conditional%2BFormatting%2B1" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 16:30:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538326#M22435</guid>
      <dc:creator>KonstantinVasil</dc:creator>
      <dc:date>2019-02-25T16:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel - Insert image within cell</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538394#M22437</link>
      <description>&lt;P&gt;Try inserting unicodes instead of the images. You may need to find the unicode values for the icons you want.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods escapechar='^';
proc report data=sashelp.class;
column Name Sex Symbol Age ;
define Symbol/computed;

compute Symbol/character length=50;
	if sex='M' then do;
		Symbol="^{unicode '2642'x}";
		call define(_col_,'style','style={color=red font_face="Arial Unicode MS" font_size=24pt}');
	end;
	else do;
		Symbol="^{unicode '2640'x}";
		call define(_col_,'style','style={color=green font_face="Arial Unicode MS" font_size=24pt}');
	end;
endcomp;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27427iAA1C2CD569C675AA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If your interested, I searched &lt;A href="https://www.compart.com/en/unicode/search?q=male#characters" target="_self"&gt;here&lt;/A&gt; for unicodes.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 19:30:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538394#M22437</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2019-02-25T19:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel - Insert image within cell</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538599#M22440</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you. The unicode work-around is clever although that the symbols are not exactly the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I run into some problems when the variable to which I am comparing is numeric. For example, the code below does not work unless Weight is defined as group or order. In my case, this is not a solution, because I have other group variables with spanrows and I do not want Weight to be spanned. Is there some way to assign Symbol based on a numeric variable that is not order or group variable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;ods escapechar='^';
proc report data=sashelp.class;
	column Name Sex Weight Symbol Age ;
	define Symbol/computed;
	/*define Weight/group;*/
	compute Symbol/character length=50;
		if Weight&amp;gt;100 then do;
			Symbol="^{unicode '2642'x}";
			call define(_col_,'style','style={color=red font_face="Arial Unicode MS" font_size=24pt}');
		end;
		else do;
			Symbol="^{unicode '2640'x}";
			call define(_col_,'style','style={color=green font_face="Arial Unicode MS" font_size=24pt}');
		end;
	endcomp;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Feb 2019 09:23:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538599#M22440</guid>
      <dc:creator>KonstantinVasil</dc:creator>
      <dc:date>2019-02-26T09:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel - Insert image within cell</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538654#M22443</link>
      <description>Hi, if you want WEIGHT to be an analysis variable, with a default statistic of SUM, then the correct reference in the COMPUTE block would be &lt;BR /&gt;if weight.sum &amp;gt; 100&lt;BR /&gt;&lt;BR /&gt;  This is a compound name that PROC REPORT requires when your numeric variables are used as analysis variables on the report. Otherwise, if you are not calculating report breaks (grand totals) or group breaks (subtotals), then you can change the usage of WEIGHT to display and then you can use the simple &lt;BR /&gt;if weight&amp;gt;100&lt;BR /&gt;in your COMPUTE block.&lt;BR /&gt;Cynthia</description>
      <pubDate>Tue, 26 Feb 2019 15:52:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Excel-Insert-image-within-cell/m-p/538654#M22443</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-02-26T15:52:16Z</dc:date>
    </item>
  </channel>
</rss>

