<?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 / PROC REPORT - How to remove extra row height when preventing text wrapping? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/846021#M334460</link>
    <description>&lt;P&gt;To fit within 2 in you may need to use a smaller font, otherwise it would wrap with the default font&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file = '~/test/wrap.xlsx'  
   OPTIONS(FLOW='Tables' absolute_column_width='2.1in');   &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ghosh_0-1669235583931.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77640i5C61B221775D00E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ghosh_0-1669235583931.png" alt="ghosh_0-1669235583931.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2022 20:34:01 GMT</pubDate>
    <dc:creator>ghosh</dc:creator>
    <dc:date>2022-11-23T20:34:01Z</dc:date>
    <item>
      <title>ODS Excel / PROC REPORT - How to remove extra row height when preventing text wrapping?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/845798#M334374</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I run the code below, the second string displays in the resulting file with the "Q" below the A thru P, though there appears to be sufficient space for the Q to appear directly to the right of the P. I can solve this by adding&amp;nbsp;&lt;EM&gt;options(flow="tables")&lt;/EM&gt; to the ods excel statement, which stops the Q from wrapping onto the next line. The issue is that, when I do this, the height of the cell containing the second string is still greater than the height of the cell containing the first string. Is there a way for the height of the taller row to be reduced so that it matches the height of the shorter row (other than manually changing it within Excel)? I tried&amp;nbsp;&lt;EM&gt;cellheight&lt;/EM&gt; but that didn't seem to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&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;ods excel file = "[filepath].xlsx";

data d;
	length x $ 100;
	x = "A B C D E"; output;
	x = "A B C D E F G H I J K L M N O P Q"; output;
run;

proc report data = d;
	column x;
	define x / style(column) = [cellwidth = 2 in] display;
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="sasxls1.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77577i9D51CCFBC759D985/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sasxls1.PNG" alt="sasxls1.PNG" /&gt;&lt;/span&gt;&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="sasxls2.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77578iD1D6EB95D934AC1A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sasxls2.PNG" alt="sasxls2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 00:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/845798#M334374</guid>
      <dc:creator>derekg</dc:creator>
      <dc:date>2022-11-23T00:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel / PROC REPORT - How to remove extra row height when preventing text wrapping?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/845811#M334379</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file = "c:\temp\temp.xlsx";

data d;
	length x $ 100;
	x = "A B C D E"; output;
	x = "A B C D E F G H I J K L M N O P Q"; output;
run;

proc report data = d nowd;
	column x;
	define x / style(column) = [tagattr='wrap:no'] display;
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 Nov 2022 02:07:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/845811#M334379</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-23T02:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel / PROC REPORT - How to remove extra row height when preventing text wrapping?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/845813#M334380</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1669169446875.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77581iF65A5782BC8CE13C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1669169446875.png" alt="Ksharp_0-1669169446875.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 02:10:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/845813#M334380</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2022-11-23T02:10:15Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel / PROC REPORT - How to remove extra row height when preventing text wrapping?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/845956#M334435</link>
      <description>I had tried playing around with tagattr='wrap:no' as well... Unfortunately, I don't think this solution quite accomplishes what I'm looking for. It does fix the cell height issue, but it does so by increasing the cell width (beyond the width of 2 inches I had used in my example). I probably should have been clearer about this, but I'm looking for a solution that would not require increasing the cell width (or changing the size of the text).</description>
      <pubDate>Wed, 23 Nov 2022 14:49:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/845956#M334435</guid>
      <dc:creator>derekg</dc:creator>
      <dc:date>2022-11-23T14:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel / PROC REPORT - How to remove extra row height when preventing text wrapping?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/845979#M334442</link>
      <description>&lt;P&gt;Just add&amp;nbsp;OPTIONS(FLOW='Tables') to the ods excel file line&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file = '~/test/wrap.xlsx'  OPTIONS(FLOW='Tables');

data d;
	length x $ 100;
	x = "A B C D E"; output;
	x = "A B C D E F G H I J K L M N O P Q"; output;
run;

proc report data = d;
	column x;
	define x /  display;
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&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="ghosh_0-1669222140013.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77627iD5C8FC50C6592C38/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ghosh_0-1669222140013.png" alt="ghosh_0-1669222140013.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 16:51:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/845979#M334442</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2022-11-23T16:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel / PROC REPORT - How to remove extra row height when preventing text wrapping?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/846002#M334449</link>
      <description>Again, similarly to Ksharp's answer, in this block of code, the "cellwidth = 2 in" that I used in my original example has been removed. So, at least when I run this code, this results in a cell width that is slightly more than 2 inches. I am trying to find a solution that would allow the cell width to remain fixed at 2 inches, while keeping the height of rows 2 and 3 equally short.</description>
      <pubDate>Wed, 23 Nov 2022 19:20:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/846002#M334449</guid>
      <dc:creator>derekg</dc:creator>
      <dc:date>2022-11-23T19:20:51Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel / PROC REPORT - How to remove extra row height when preventing text wrapping?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/846021#M334460</link>
      <description>&lt;P&gt;To fit within 2 in you may need to use a smaller font, otherwise it would wrap with the default font&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file = '~/test/wrap.xlsx'  
   OPTIONS(FLOW='Tables' absolute_column_width='2.1in');   &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ghosh_0-1669235583931.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77640i5C61B221775D00E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ghosh_0-1669235583931.png" alt="ghosh_0-1669235583931.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 20:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/846021#M334460</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2022-11-23T20:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel / PROC REPORT - How to remove extra row height when preventing text wrapping?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/846040#M334471</link>
      <description>&lt;P&gt;It seems that absolute_column_width may work differently from cellwidth. If I set a width of 2 inches using absolute_column_width, I get a shorter width than if I set a width of 2 inches using cellwidth. Interestingly, though, if I set a width of 2.2 inches using absolute_column_width, then this comes close to providing a solution to my problem, as the resulting file has the two rows printed without wrapping, with equal row heights, and without a greater width than the width used from my original example (i.e., 2.2 inches using absolute_column_width actually provides a shorter width than 2 inches using cellwidth).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, my understanding is that absolute_column_width would set the length of all columns in the table, right? Ultimately, the application for this would involve a table with multiple columns, where I will want it to be possible for different columns to have different widths.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if I have something like this, where I want columns x and y to have different widths, I'm back to having the same problem where row 3 has unnecessary extra vertical height.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file = "[filepath].xlsx"  OPTIONS(FLOW='Tables');

data d;
	length x y $ 100;
	x = "A B C D E"; y = "A B C D E"; output;
	x = "A B C D E F G H I J K L M N O P Q"; y = "A B C D E F G H I J K L M N O P Q"; output;
run;

proc report data = d;
	column x y;
	define x / style(column) = [cellwidth = 3 in] display;
	define y / style(column) = [cellwidth = 2 in] display;
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="sasxls9.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/77644i612C489F51445F0F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sasxls9.PNG" alt="sasxls9.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 21:47:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/846040#M334471</guid>
      <dc:creator>derekg</dc:creator>
      <dc:date>2022-11-23T21:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel / PROC REPORT - How to remove extra row height when preventing text wrapping?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/846041#M334472</link>
      <description>Oh, wait a minute... I see that you can set multiple widths using absolute_column_width. Maybe that will work...</description>
      <pubDate>Wed, 23 Nov 2022 21:50:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/846041#M334472</guid>
      <dc:creator>derekg</dc:creator>
      <dc:date>2022-11-23T21:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Excel / PROC REPORT - How to remove extra row height when preventing text wrapping?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/846042#M334473</link>
      <description>Exactly, you can list the cell widths in a comma delimited string</description>
      <pubDate>Wed, 23 Nov 2022 21:52:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-Excel-PROC-REPORT-How-to-remove-extra-row-height-when/m-p/846042#M334473</guid>
      <dc:creator>ghosh</dc:creator>
      <dc:date>2022-11-23T21:52:04Z</dc:date>
    </item>
  </channel>
</rss>

