<?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: Create a blank column shaded grey in PROC REPORT/ODS EXCEL in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Create-a-blank-column-shaded-grey-in-PROC-REPORT-ODS-EXCEL/m-p/930778#M26606</link>
    <description>&lt;P&gt;Very nice, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt; . Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jun 2024 09:55:42 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2024-06-04T09:55:42Z</dc:date>
    <item>
      <title>Create a blank column shaded grey in PROC REPORT/ODS EXCEL</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Create-a-blank-column-shaded-grey-in-PROC-REPORT-ODS-EXCEL/m-p/930599#M26604</link>
      <description>&lt;P&gt;Suppose, because I would like to create some visual separation between groups of columns in PROC REPORT output, I want a column that is shaded gray and has no data in it. I can get most of the way there via this program. Note the use of the fake variable GAP in the columns statement, which produces the empty column F in the Excel output. But you can see the gray appears for the DATA rows but not for the header rows. In PROC REPORT, I use style(header) but it doesn't produce the desired results. So how can I get PROC REPORT to shade the first two rows of column F the same color gray?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
    value gapf .,low-high=' ';
run;

ods excel file="test.xlsx";
proc report data=sashelp.cars(obs=50);
    columns make msrp,type gap invoice,type;
    define make/group "Make";
    define type/across " ";
    define gap/' ' format=gapf. style(column)={cellwidth=.01in backgroundcolor=verylightgray}
         style(header)={backgroundcolor=verylightgray};
    define msrp/mean "MSRP";
    define invoice/mean "Invoice";
run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&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="PaigeMiller_0-1717415919519.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96921i5F4100F3ECFF5147/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PaigeMiller_0-1717415919519.png" alt="PaigeMiller_0-1717415919519.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, how can I make column F narrower, the option &lt;FONT face="courier new,courier"&gt;cellwidth=.01in&lt;/FONT&gt; doesn't seem to make it that narrow? Is this too narrow in Excel?&amp;nbsp;&lt;FONT color="#FF0000"&gt;EDIT: it appears I can narrow the column width via the ABSOLUTE_COLUMN_WIDTH option of ODS EXCEL, but that's tedious, it still would be better if I could do it in PROC REPORT with STYLE()=.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 12:56:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Create-a-blank-column-shaded-grey-in-PROC-REPORT-ODS-EXCEL/m-p/930599#M26604</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-06-03T12:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Create a blank column shaded grey in PROC REPORT/ODS EXCEL</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Create-a-blank-column-shaded-grey-in-PROC-REPORT-ODS-EXCEL/m-p/930754#M26605</link>
      <description>&lt;P&gt;Paige,&lt;/P&gt;
&lt;P&gt;You could use Traffic Light to get it .&lt;/P&gt;
&lt;P&gt;But for your second question, I think you have to use "&lt;SPAN&gt;ABSOLUTE_COLUMN_WIDTH&amp;nbsp;&lt;/SPAN&gt;", or maybe&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp; knew something I don't know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc format;
value $fmt
'd'='verylightgray'
;
run;

ods excel file="c:\temp\test.xlsx";
proc report data=sashelp.cars(obs=50) nowd style(header)={foreground=$fmt. backgroundcolor=$fmt.};
    columns make msrp,type ('d' (' ' dummy)) invoice,type;
    define make/group "Make";
    define type/across " ";
    define dummy/computed 'd' style(column header)={ backgroundcolor=verylightgray};
    define msrp/mean "MSRP";
    define invoice/mean "Invoice";
	compute dummy/character length=1;
	 dummy=' ';
	endcomp;
run;
ods excel close;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1717468618042.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/96997i421B7770D99053F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1717468618042.png" alt="Ksharp_0-1717468618042.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 02:42:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Create-a-blank-column-shaded-grey-in-PROC-REPORT-ODS-EXCEL/m-p/930754#M26605</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2024-06-04T02:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create a blank column shaded grey in PROC REPORT/ODS EXCEL</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Create-a-blank-column-shaded-grey-in-PROC-REPORT-ODS-EXCEL/m-p/930778#M26606</link>
      <description>&lt;P&gt;Very nice, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt; . Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 09:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Create-a-blank-column-shaded-grey-in-PROC-REPORT-ODS-EXCEL/m-p/930778#M26606</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-06-04T09:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create a blank column shaded grey in PROC REPORT/ODS EXCEL</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Create-a-blank-column-shaded-grey-in-PROC-REPORT-ODS-EXCEL/m-p/930808#M26607</link>
      <description>Hi: &lt;BR /&gt;  Ksharp's solution is the technique that I suggest if you need to control spanning headers with a different color (spanning headers is where the empty blue header for the GAP column comes from on the row with MSRP and Invoice). Absolute_Column_Width is the only way I know to force Excel to change width when cellwidth doesn't work. &lt;BR /&gt;Cynthia</description>
      <pubDate>Tue, 04 Jun 2024 14:00:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Create-a-blank-column-shaded-grey-in-PROC-REPORT-ODS-EXCEL/m-p/930808#M26607</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2024-06-04T14:00:04Z</dc:date>
    </item>
  </channel>
</rss>

