<?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 give bi-colouring for the output in the ODS excel procedure in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861438#M340287</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/427929"&gt;@sah_biostat&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually, I have datasets, variable, length, label as the variable names. I have many datasets in the datasets column .I cannot give style option manually. So, I am looking for any default options which i can put inside the macro.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How many different datasets are there? How many different colors do you need? What do you mean by "bi-coloring"? Can you provide example data (in the format I mentioned above)?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Also, you did not mention a macro in your original message. What do you want a macro to do?&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 16:15:32 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2023-02-28T16:15:32Z</dc:date>
    <item>
      <title>How to give bi-colouring for the output in the ODS excel procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861415#M340278</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a sas dataset which contains all the ADaM datasets atrributes.I would like to export this dataset to excel.Is there any option to get the output with specific colours to differentiate the different datasets?&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-inline" image-alt="sah_biostat_0-1677595859537.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80932iF5F0879F2C205D9C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sah_biostat_0-1677595859537.png" alt="sah_biostat_0-1677595859537.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you see above screenshot my desired output should show all the adae information into one colour and all the admh into one colour.Are there any options ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;ods excel file="xxxx.xlsx";
proc print data=final noobs;
run;
ods excel close;&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please kindly help.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 14:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861415#M340278</guid>
      <dc:creator>sah_biostat</dc:creator>
      <dc:date>2023-02-28T14:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to give bi-colouring for the output in the ODS excel procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861420#M340280</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc report data=yourdataset;
    columns variable1 variable2;
    compute variable1;
        if variable1='ADAE' then call define(_row_,'style','style={background=lightyellow}');
        else if variable1='ADMH' then call define(_row_,'style','style={background=lightmoderategreen}');
    endcompute;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;From now on, do NOT provide data as screen captures. We cannot program from screen captures. We need data as working SAS data step code (&lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;instructions&lt;/A&gt;), not screen captures or file attachments. In addition, in your screen capture, you didn't even show us the variable names, hence I use VARIABLE1 and VARIABLE2 as variable names, which you can fix.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 15:11:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861420#M340280</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-28T15:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to give bi-colouring for the output in the ODS excel procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861428#M340283</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the quick response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually, I have datasets, variable, length, label as the variable names. I have many datasets in the datasets column .I cannot give style option manually. So, I am looking for any default options which i can put inside the macro.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 15:18:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861428#M340283</guid>
      <dc:creator>sah_biostat</dc:creator>
      <dc:date>2023-02-28T15:18:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to give bi-colouring for the output in the ODS excel procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861438#M340287</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/427929"&gt;@sah_biostat&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Actually, I have datasets, variable, length, label as the variable names. I have many datasets in the datasets column .I cannot give style option manually. So, I am looking for any default options which i can put inside the macro.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;How many different datasets are there? How many different colors do you need? What do you mean by "bi-coloring"? Can you provide example data (in the format I mentioned above)?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Also, you did not mention a macro in your original message. What do you want a macro to do?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 16:15:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861438#M340287</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-28T16:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to give bi-colouring for the output in the ODS excel procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861505#M340309</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 15 +datasets in the dataset column.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sah_biostat_0-1677604991793.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80955i9CBB0172F0C83F79/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sah_biostat_0-1677604991793.png" alt="sah_biostat_0-1677604991793.png" /&gt;&lt;/span&gt;Bi -colouring means just two colours simultaneously to differentiate the datasets visually.&amp;nbsp;&lt;SPAN&gt;&lt;SPAN class=""&gt;For instance, the first adam dataset is in grey, the second in white and repeating. Here, macro means this is for one study and I would like to apply this for every study so,we cannot fix dataset number(every study varies).For instance,leave macro topic. If we get solution for one study also fine.Looking for the options to get the output in desired way.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Sorry for attaching the screenshot I am unable to explain you clearly without the image.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 17:34:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861505#M340309</guid>
      <dc:creator>sah_biostat</dc:creator>
      <dc:date>2023-02-28T17:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to give bi-colouring for the output in the ODS excel procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861507#M340310</link>
      <description>&lt;P&gt;I realize that you are new here, but I have previously said I cannot work from data in screen captures. Data must be in the form of working SAS data step code, which you can type in yourself or follow the instructions I gave. Data cannot be in the form of file attachments or screen captures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is untested code, as I don't have data to test it on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=have;
    by impacted_adam;
run;
data temporary;
    set have;
    by impacted_adam;
    if first.impacted_adam then group+1;
run;
proc report data=temporary;
    columns group impacted_adam variable ... ;
    define group/noprint;
    compute variable1;
        if mod(group,2)=1 then call define(_row_,'style','style={background=lightgrey}');
        else call define(_row_,'style','style={background=lightmoderateyellow}');
    endcompute;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 18:26:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861507#M340310</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-28T18:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to give bi-colouring for the output in the ODS excel procedure</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861529#M340320</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; One way around having to specify values in the COMPUTE block is to use a user-defined format, as shown here:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_0-1677608062127.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/80957i0D313F0F7BEBDFBB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_0-1677608062127.png" alt="Cynthia_sas_0-1677608062127.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I based the format on the first character of the name field in the SASHELP.CLASS file. The variable I created was called ALFA. Your format would have the dataset names and the colors you choose. I picked 4 colors. You could pick 2 different colors. In the PROC REPORT code, the ALFA column is a NOPRINT column, so it is available to be used, but does not display on the report. This kind of trafficlighting should also work in ODS EXCEL. Without any example data, it is hard to do more than make general suggestions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 18:16:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-give-bi-colouring-for-the-output-in-the-ODS-excel/m-p/861529#M340320</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2023-02-28T18:16:18Z</dc:date>
    </item>
  </channel>
</rss>

