<?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 TopAlign data cells in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-TopAlign-data-cells/m-p/772600#M25334</link>
    <description>Hi:&lt;BR /&gt;  VJUST=T will also work. or VERTICALALIGN=T. Typically, the only style attributes that need to be quoted are text strings (like for Table of Contents) or font names which contain spaces, or a string of font family specifications.&lt;BR /&gt;Cynthia</description>
    <pubDate>Thu, 07 Oct 2021 00:02:33 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2021-10-07T00:02:33Z</dc:date>
    <item>
      <title>ODS EXCEL TopAlign data cells</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-TopAlign-data-cells/m-p/772509#M25330</link>
      <description>&lt;P&gt;Is there a way to top align data cells in ODS EXCEL using a custom style with a STYLE or CLASS override?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this example I can set the font to be 10pt Arial, don't know how to top align.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;dm 'clear log' log;

proc template;
  source styles.default;
  source styles.statistical;
  define style special;
  parent = styles.statistical;
  style fonts from fonts /
    'HeadingFont'= ('Arial', 10pt, bold)
    'DocFont'    = ('Arial', 10pt)
  ;
  end;
run;

ods excel 
  file="special%sysfunc(monotonic()).xlsx" 
  style=special 
  options(
    zoom='85'
    row_heights='15,25'
  )
;

proc print noobs label data=sashelp.class;
run;

ods excel close;
&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="RichardADeVenezia_0-1633543405512.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64414i6055EE505BD15831/image-size/medium?v=v2&amp;amp;px=400" role="button" title="RichardADeVenezia_0-1633543405512.png" alt="RichardADeVenezia_0-1633543405512.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 18:05:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-TopAlign-data-cells/m-p/772509#M25330</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2021-10-06T18:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL TopAlign data cells</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-TopAlign-data-cells/m-p/772518#M25331</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; These worked for me without changing any suboptions for ODS Excel.&lt;/P&gt;
&lt;P&gt;1) Using Style overrides:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_1-1633544596308.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64416i3E26469162613A78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_1-1633544596308.png" alt="Cynthia_sas_1-1633544596308.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) Using PROC Template:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cynthia_sas_2-1633544635931.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64417i5683D6617DDC3AD9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cynthia_sas_2-1633544635931.png" alt="Cynthia_sas_2-1633544635931.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;(I only changed the header cells. If you want to top align the data cells too, you'd need a style override for style(column) in PROC REPORT and for style(data) in PROC PRINT. Inside the style template, you'd use CLASS data in addition to CLASS header.)&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 18:26:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-TopAlign-data-cells/m-p/772518#M25331</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-10-06T18:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL TopAlign data cells</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-TopAlign-data-cells/m-p/772555#M25332</link>
      <description>&lt;P&gt;The default cell sizes may not allow for changes in justification so you may need to make the cells taller first.&lt;/P&gt;
&lt;P&gt;This changes the column headings as well as the body of the table using Proc Print. Proc Print will make all the cells the same height, largest if you specify multiple different heights.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc print data=sashelp.class;
  var name / style=[vjust=top height=.5in];
  var sex  / style=[vjust=center ];
  var age height weight / style=[vjust=bottom ];
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Oct 2021 19:56:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-TopAlign-data-cells/m-p/772555#M25332</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-06T19:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL TopAlign data cells</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-TopAlign-data-cells/m-p/772596#M25333</link>
      <description>&lt;P&gt;Thanks for the replies.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Turns out the template statement needed is:&lt;/P&gt;
&lt;PRE&gt;  style data from data /
    VerticalAlign = Top
  ;
  end;
&lt;/PRE&gt;
&lt;P&gt;I had tried name value pair in quotes. &lt;CODE&gt;"VerticalAlign"="Top"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Oct 2021 23:33:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-TopAlign-data-cells/m-p/772596#M25333</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2021-10-06T23:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: ODS EXCEL TopAlign data cells</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-TopAlign-data-cells/m-p/772600#M25334</link>
      <description>Hi:&lt;BR /&gt;  VJUST=T will also work. or VERTICALALIGN=T. Typically, the only style attributes that need to be quoted are text strings (like for Table of Contents) or font names which contain spaces, or a string of font family specifications.&lt;BR /&gt;Cynthia</description>
      <pubDate>Thu, 07 Oct 2021 00:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-EXCEL-TopAlign-data-cells/m-p/772600#M25334</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2021-10-07T00:02:33Z</dc:date>
    </item>
  </channel>
</rss>

