<?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: Recurring question: Automatically Adjust Row Height in Excel in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989577#M380218</link>
    <description>&lt;P&gt;What happens if you ask ODS itself to split the lines of text in the cells by using an ODS escape sequence?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
  x = catx( '(*ESC*)n' , '0000000000', '4445566778','9999999999','9991123456'); 
run;
filename xlsx '~/example.xlsx';
ods excel file=xlsx
 options(sheet_name='example' 
				flow="Tables" 
				)
;          
proc print data=have noobs;
run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That seems to come close when I open the XLSX file in Numbers application.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-06-11 at 2.29.34 PM.png" style="width: 620px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/115801i573885DD503B6D60/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-06-11 at 2.29.34 PM.png" alt="Screenshot 2026-06-11 at 2.29.34 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jun 2026 18:31:23 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2026-06-11T18:31:23Z</dc:date>
    <item>
      <title>Recurring question: Automatically Adjust Row Height in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989440#M380206</link>
      <description>&lt;P&gt;Here is a table with variables that contain values of random lengths and random number of lines.&amp;nbsp;&lt;BR /&gt;Q: Is there a way to export this to Excel from SAS so all values are visible inside a cell?&lt;/P&gt;
&lt;P&gt;No wrapping, one line per value, cell width not that important.&lt;/P&gt;
&lt;P&gt;It seems that ever since&amp;nbsp;option &lt;FONT face="courier new,courier"&gt;autofit_height&lt;/FONT&gt;&amp;nbsp; was removed, nothing works?&lt;BR /&gt;The EOL delimiter can be changed&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
  x = catx( '0D0A'x, '0000000000', '4445566778','9999999999','9991123456'); 
run;

ods excel file="&amp;amp;wdir\print.xlsx" options(sheet_name='Test');          
  proc print data=HAVE noobs ;
  run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Setting &lt;FONT face="courier new,courier"&gt;cellwidth&lt;/FONT&gt;&amp;nbsp;to force line wrapping as sometimes suggested does not look like a solution since it breaks lines randomly rather than where required.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2026 05:11:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989440#M380206</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2026-06-10T05:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Recurring question: Automatically Adjust Row Height in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989444#M380207</link>
      <description>&lt;P&gt;Chris,&lt;/P&gt;
&lt;P&gt;You could try option "tagattr=“ to avoid&amp;nbsp; &lt;SPAN&gt;wrapping&amp;nbsp;&lt;/SPAN&gt; a line when you want to outpu an excel file.&lt;/P&gt;
&lt;P&gt;Here is an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data HAVE;
  x = catx( '0D0A'x, '0000000000', '4445566778','9999999999','9991123456'); 
run;

ods excel file="c:\temp\print.xlsx" options(sheet_name='Test');          
  proc report data=HAVE nowd ;
  columns x;
  define _all_/display style={&lt;STRONG&gt;tagattr="wrap:no"&lt;/STRONG&gt;};
  run;
ods excel close;&lt;/PRE&gt;</description>
      <pubDate>Wed, 10 Jun 2026 07:06:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989444#M380207</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-06-10T07:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: Recurring question: Automatically Adjust Row Height in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989525#M380209</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;!&lt;BR /&gt;&lt;BR /&gt;Sadly this doesn't expand the row height.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Excel actually behaves weirdly (this might be a company setup issue):&lt;/P&gt;
&lt;P&gt;When I open the file, all values are in one row. Then I click on the cell, then on the formula bar and the cell changes to only display the top row.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case I cannot see the list of values because the row height is still the default height.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2026 01:28:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989525#M380209</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2026-06-11T01:28:37Z</dc:date>
    </item>
    <item>
      <title>Re: Recurring question: Automatically Adjust Row Height in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989536#M380210</link>
      <description>&lt;P&gt;Chris,&lt;/P&gt;
&lt;P&gt;Could you adjust it by hand ? Just click this button when you tap a cell.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Ksharp_0-1781161154884.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/115787iBBE977C1B34F10EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Ksharp_0-1781161154884.png" alt="Ksharp_0-1781161154884.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2026 06:59:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989536#M380210</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2026-06-11T06:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: Recurring question: Automatically Adjust Row Height in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989569#M380217</link>
      <description>&lt;P&gt;With some trial and error and AI conversation, I got all lines visible from your example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
  x = catx( '0A'x , '0000000000', '4445566778','9999999999','9991123456'); 
run;

ods excel file="print.xlsx" options(sheet_name='Test' 
												 flow="Tables" 
												 row_heights="0,0,0,0,0");          
  proc print data=HAVE noobs ;
  	var x / style(column)={width=2.5cm
                           vjust=top 
                           tagattr="wrap:yes"
                       };
  run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But as you can guess, the setting of width= needs to be correlate with the actual length of your strings, which probably will make this hard to use in every day applications....?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2026 12:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989569#M380217</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2026-06-11T12:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Recurring question: Automatically Adjust Row Height in Excel</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989577#M380218</link>
      <description>&lt;P&gt;What happens if you ask ODS itself to split the lines of text in the cells by using an ODS escape sequence?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
  x = catx( '(*ESC*)n' , '0000000000', '4445566778','9999999999','9991123456'); 
run;
filename xlsx '~/example.xlsx';
ods excel file=xlsx
 options(sheet_name='example' 
				flow="Tables" 
				)
;          
proc print data=have noobs;
run;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That seems to come close when I open the XLSX file in Numbers application.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2026-06-11 at 2.29.34 PM.png" style="width: 620px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/115801i573885DD503B6D60/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2026-06-11 at 2.29.34 PM.png" alt="Screenshot 2026-06-11 at 2.29.34 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2026 18:31:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recurring-question-Automatically-Adjust-Row-Height-in-Excel/m-p/989577#M380218</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2026-06-11T18:31:23Z</dc:date>
    </item>
  </channel>
</rss>

