<?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: 1) variable with long length flows onto next line (but same cell in Excel) and 2) removing % in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/498089#M72495</link>
    <description>If you don't want a percent, don't apply percent format.&lt;BR /&gt;&lt;BR /&gt;Excel has a word-wrap feature.  You can either disable that or increase the column width for LOCATION.</description>
    <pubDate>Sat, 22 Sep 2018 16:25:25 GMT</pubDate>
    <dc:creator>Haris</dc:creator>
    <dc:date>2018-09-22T16:25:25Z</dc:date>
    <item>
      <title>1) variable with long length flows onto next line (but same cell in Excel) and 2) removing %</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/497161#M72452</link>
      <description>&lt;PRE&gt;ods excel file="F:\want.xlsx" style=journal;
ods excel options(sheet_name='Want' autofit_height='yes' width_fudge='0.58');

proc report data=want nowindows headline headskip ;
	column location ('DATE' date ) ('TOTAL' total)  ('ALL' all) 
                    ('STUDENTS WITH VAX1' vax1)  ('STUDENTS WITH VAX2' vax2)
                    (STUDENTS WITH VAX3' vax3)  ('STUDENTS WITH VAX4' vax4);
	define location / group order;
	define date / group order=internal descending ' '; 
	define total / analysis 'NUMBER' format=comma8.;
    define vax1 / display right 'PERCENT' format=percent7.2 
           style(column)={tagattr="format:##0.00\%"};
	define vax2/ display 'PERCENT' format=percent7.2 
           style(column)={tagattr="format:##0.00\%"};
    define vax3 / display 'PERCENT' format=percent7.2 
           style(column)={tagattr="format:##0.00\%"};
    define vax4 / display  'PERCENT' format=percent7.2 
           style(column)={tagattr="format:##0.00\%"};
	define vax5 / display 'PERCENT' format=percent7.2 
           style(column)={tagattr="format:##0.00\%"};  
	compute after location; line ' ';	endcomp;
	
run;  

ods excel close; 
run;
&lt;/PRE&gt;
&lt;P&gt;I have three questions:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) How do you get SAS not to display the % sign in the SAS output?&amp;nbsp; The vaccine variables need to be multiplied by 100 to get a percent but how can I not display the % sign?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) I was trying to get SAS to multiply the vax variables by 100 but they ended up being displayed in the Excel output as 10000.00% instead of 100% or 9500% instead of 95.00% even though the actual value is 0.100 and 0.95.&amp;nbsp; Am I doing something wrong?&lt;/P&gt;
&lt;P&gt;2)&amp;nbsp; Some of the text in the variable 'Location' is made up of two words.&amp;nbsp; When SAS exports into Excel, the location names with two words don't stay on the same line but overflows onto the next line (same cell in Excel, not a new row)&amp;nbsp;and the row height is doubled.&amp;nbsp; How do you keep the text on the same row so all row heights are equal?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Sep 2018 21:49:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/497161#M72452</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-09-19T21:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: 1) variable with long length flows onto next line (but same cell in Excel) and 2) removing %</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/498089#M72495</link>
      <description>If you don't want a percent, don't apply percent format.&lt;BR /&gt;&lt;BR /&gt;Excel has a word-wrap feature.  You can either disable that or increase the column width for LOCATION.</description>
      <pubDate>Sat, 22 Sep 2018 16:25:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/498089#M72495</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2018-09-22T16:25:25Z</dc:date>
    </item>
    <item>
      <title>Re: 1) variable with long length flows onto next line (but same cell in Excel) and 2) removing %</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/498777#M72527</link>
      <description>Thanks. I tried disabling the word wrap feature in Excel and the words no longer wrapped. However, some of the spaces between the two or three word locations were missing.  Is there a way to get around that?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Sep 2018 17:00:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/498777#M72527</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-09-25T17:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: 1) variable with long length flows onto next line (but same cell in Excel) and 2) removing %</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/498781#M72529</link>
      <description>That's sounds specific to your data which I don't know.&lt;BR /&gt;</description>
      <pubDate>Tue, 25 Sep 2018 17:33:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/498781#M72529</guid>
      <dc:creator>Haris</dc:creator>
      <dc:date>2018-09-25T17:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: 1) variable with long length flows onto next line (but same cell in Excel) and 2) removing %</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/499086#M72549</link>
      <description>&lt;P&gt;If you are using SAS 9.4M4 or later, you can use the FLOW= suboption.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13736"&gt;@Chevell_sas&lt;/a&gt;&amp;nbsp;wrote a blog post that mentions the text wrapping issue.&amp;nbsp; See &lt;A href="https://blogs.sas.com/content/sgf/2017/02/20/tips-for-using-the-ods-excel-destination/" target="_blank"&gt;Tips for Using the ODS Excel Destination&lt;/A&gt; for more details.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let folder=/folders/myfolders/ODS Excel examples;

* some of the player names in SASHELP.BASEBALL are long.  in example 
* below, some player names will wrap in Excel output.  if you disable
* wrap text in Excel, you will notice that some spaces are lost.  player
* names are Lastname, Firstname.  the names that were wrapped lose the
* space between the comma and the Firstname. ; 

ods excel file="&amp;amp;folder/long_text.xlsx"
  options(sheet_name='Using defaults'
          index='on');

proc report data=sashelp.baseball;
  column name team league division natbat nhits nruns nrbi;
run;

* flow= option is new for SAS 9.4M4.  for more details, see 
* https://blogs.sas.com/content/sgf/2017/02/20/tips-for-using-the-ods-excel-destination/ ;

ods excel options(flow='tables'
                  sheet_name='Using flow option');
  
proc report data=sashelp.baseball;
  column name team league division natbat nhits nruns nrbi;
run;


* ok, long names no longer wrap, but now the rows where the names had
* wrapped are bigger than the other rows.  use row_height= option.  
* there are 7 parameters for row_height.  0 means use default from 
* style. ;

ods excel options(flow='tables'
                  row_heights='0,14,0,0,0,0,0'
                  sheet_name='Using flow and row_height');
  
proc report data=sashelp.baseball;
  column name team league division natbat nhits nruns nrbi;
run;

ods excel close; 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The screen shot below shows the player's name column with text wrapping.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen shot showing long text wrapping in ODS Excel output" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23545i4EBCAFF69A2280A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="ODS Excel default settings long text wraps.jpg" alt="Screen shot showing long text wrapping in ODS Excel output" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Screen shot showing long text wrapping in ODS Excel output&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you disable text wrapping in Excel, you may notice that you lose some blank spaces in the output.&amp;nbsp; Player names are listed as Lastname, Firstname.&amp;nbsp; The text that had wrapped loses the space between the comma and the first name.&amp;nbsp; The screen shot below shows the name that had wrapped after I disabled text wrapping in Excel.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen shot showing long text after disabling text wrapping in Excel" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23546iAA8356504C13574E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Disable text wrapping in Excel and you lose some spaces.jpg" alt="Screen shot showing long text after disabling text wrapping in Excel" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Screen shot showing long text after disabling text wrapping in Excel&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The flow suboption prevents the long names from wrapping, but now the row height for long names appears to be twice the row height of the other rows.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Flow suboption prevents text wrapping, but some rows are twice as tall as other rows" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23547i60B74027572454E0/image-size/large?v=v2&amp;amp;px=999" role="button" title="ODS Excel with flow option.jpg" alt="Flow suboption prevents text wrapping, but some rows are twice as tall as other rows" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Flow suboption prevents text wrapping, but some rows are twice as tall as other rows&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Using the row_height suboption with the flow suboption produces nice output.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen shot showing long text not wrapping, all rows in body of report have same row height" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/23548i35212DBBE29006F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="ODS Excel using flow and row_height.jpg" alt="Screen shot showing long text not wrapping, all rows in body of report have same row height" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Screen shot showing long text not wrapping, all rows in body of report have same row height&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 14:02:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/499086#M72549</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2018-09-26T14:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: 1) variable with long length flows onto next line (but same cell in Excel) and 2) removing %</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/499225#M72550</link>
      <description>Thank you!&lt;BR /&gt;&lt;BR /&gt;I tried the example you gave and I'm getting the following messages in the log:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;70   ods excel file="&amp;amp;folder\long_text.xlsx"&lt;BR /&gt;71     options(sheet_name='Using defaults'&lt;BR /&gt;72             index='on');&lt;BR /&gt;WARNING: ODS Package ID: DEFAULT does not exist, no action taken.&lt;BR /&gt;73&lt;BR /&gt;74   proc report data=sashelp.baseball;&lt;BR /&gt;75     column name team league division natbat nhits nruns nrbi;&lt;BR /&gt;76   run;&lt;BR /&gt;&lt;BR /&gt;WARNING: ODS Package ID: (   ULT does not exist, no action taken.&lt;BR /&gt;WARNING: ODS Package ID: (   ULT does not exist, no action taken.&lt;BR /&gt;WARNING: ODS Package ID: (   ULT does not exist, no action taken.&lt;BR /&gt;WARNING: ODS Package ID: (   ULT does not exist, no action taken.&lt;BR /&gt;WARNING: ODS Package ID: (   ULT does not exist, no action taken.&lt;BR /&gt;WARNING: ODS Package ID: (   ULT does not exist, no action taken.&lt;BR /&gt;&lt;BR /&gt;WARNING: ODS Package ID: (   ULT does not exist, no action taken&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Then I tried separating the options into a separate statement and the warning disappeared:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ods excel file="&amp;amp;folder\long_text.xlsx";&lt;BR /&gt;ods excel options(flow='tables'&lt;BR /&gt;                  row_heights='0,14,0,0,0,0,0'&lt;BR /&gt;&lt;BR /&gt;                 sheet_name='TableWant');&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But, when I followed the example you gave without the flow option, there actually was no word wrap, strangely.&lt;BR /&gt;&lt;BR /&gt;When I did try using the flow option, the log said:&lt;BR /&gt;&lt;BR /&gt;Tageset option: flow not recognized:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;87   ods excel options(sheet_name='Using defaults'&lt;BR /&gt;88             index='on');&lt;BR /&gt;89&lt;BR /&gt;90   proc report data=sashelp.baseball;&lt;BR /&gt;91     column name team league division natbat nhits nruns nrbi;&lt;BR /&gt;92   run;&lt;BR /&gt;&lt;BR /&gt;NOTE: There were 322 observations read from the data set SASHELP.BASEBALL.&lt;BR /&gt;NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;      real time           1.42 seconds&lt;BR /&gt;      cpu time            1.34 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Tagset Option: flow Not recognized.&lt;BR /&gt;Tagset Option: flow Not recognized.&lt;BR /&gt;93   ods excel options(flow='tables'&lt;BR /&gt;94                     sheet_name='Using flow option');&lt;BR /&gt;95&lt;BR /&gt;96   proc report data=sashelp.baseball;&lt;BR /&gt;97     column name team league division natbat nhits nruns nrbi;&lt;BR /&gt;98   run;&lt;BR /&gt;&lt;BR /&gt;NOTE: There were 322 observations read from the data set SASHELP.BASEBALL.&lt;BR /&gt;NOTE: PROCEDURE REPORT used (Total process time):&lt;BR /&gt;      real time           1.85 seconds&lt;BR /&gt;      cpu time            1.35 seconds&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I tried adding the same ods excel options you suggested (flow, row height) to the code I that has overflow for region and for some unknown reason, it didn't' help/make a difference. The only messages I got in the log was:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Tagset Option: flow Not recognized.&lt;BR /&gt;&lt;BR /&gt;Tagset Option: flow Not recognized&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I'm using Excel 2016 and my SAS version is 9.4 TS Level 1M2&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Sep 2018 19:19:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/499225#M72550</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-09-26T19:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: 1) variable with long length flows onto next line (but same cell in Excel) and 2) removing %</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/499261#M72551</link>
      <description>&lt;P&gt;You are using a version of SAS before the FLOW option was introduced.&amp;nbsp; You have SAS 9.4M2.&amp;nbsp; FLOW is available in SAS 9.4M4 or SAS 9.4M5.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 20:53:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/499261#M72551</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2018-09-26T20:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: 1) variable with long length flows onto next line (but same cell in Excel) and 2) removing %</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/499264#M72552</link>
      <description>Do I have to get a new license (i.e, pay for a whole nother year)  to have the newer version? Or is there an update we can apply?  Thanks!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Sep 2018 20:56:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/499264#M72552</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-09-26T20:56:31Z</dc:date>
    </item>
    <item>
      <title>Re: 1) variable with long length flows onto next line (but same cell in Excel) and 2) removing %</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/499319#M72554</link>
      <description>&lt;P&gt;I'm an end-user at my organization, so I don't know much about how the SAS license works when new versions are released.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 23:16:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/499319#M72554</guid>
      <dc:creator>SuzanneDorinski</dc:creator>
      <dc:date>2018-09-26T23:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: 1) variable with long length flows onto next line (but same cell in Excel) and 2) removing %</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/500360#M72607</link>
      <description>Thank you!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Oct 2018 13:44:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/1-variable-with-long-length-flows-onto-next-line-but-same-cell/m-p/500360#M72607</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-10-01T13:44:13Z</dc:date>
    </item>
  </channel>
</rss>

