<?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: Concatenate with Carriage Return and special formatting in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/474200#M121798</link>
    <description>&lt;P&gt;My final code is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;new_var = catx("~{' ', style [font_weight=bold]", old_var1, '0a'x, "}"&lt;/P&gt;&lt;P&gt;, catx('0a'x,"~{style [font_weight=bold]", old_var2, "}"&lt;/P&gt;&lt;P&gt;, catx('0a'x, " ", old_var3)));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This formatting works within ODS Excel output that I needed. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all for your help. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Jun 2018 18:17:24 GMT</pubDate>
    <dc:creator>Lost_Gary</dc:creator>
    <dc:date>2018-06-28T18:17:24Z</dc:date>
    <item>
      <title>Concatenate with Carriage Return and special formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467651#M119399</link>
      <description>&lt;P&gt;OK, I have a special situation where I am trying to combine 2 fields into a single field with a carriage return and the first line of the output to be bold. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mary Smith&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;123 Main St. &amp;nbsp;&lt;/P&gt;&lt;P&gt;Anytown USA&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to put this output directly to Excel and I have been attempting ODS to make this happen mainly because of the bold function that I need for part of the field. &amp;nbsp;Can this happen directly in ODS? &amp;nbsp;or is there a way to concatenate these with a carriage return, then bold only a portion of the field?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 13:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467651#M119399</guid>
      <dc:creator>Lost_Gary</dc:creator>
      <dc:date>2018-06-05T13:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate with Carriage Return and special formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467656#M119401</link>
      <description>&lt;P&gt;Use escapechar= and special character&amp;nbsp; '~n' .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods escapechar='~' ;&lt;BR /&gt;...........&lt;BR /&gt;x='Mary Smith ~n 123 Main St. ~n Anytown USA ~n';&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 13:32:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467656#M119401</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-06-05T13:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate with Carriage Return and special formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467665#M119405</link>
      <description>&lt;P&gt;Not sure I completely understand how to use the escapechar feature. &amp;nbsp;Is this used in the dataset or in the proc print of the ods output? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods escapechar='~';&lt;/P&gt;&lt;P&gt;data new_data;&lt;/P&gt;&lt;P&gt;set old_data;&lt;/P&gt;&lt;P&gt;name_address = name ~n address ~n;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods escapechar='~';&lt;/P&gt;&lt;P&gt;proc print data old_data;&lt;/P&gt;&lt;P&gt;var&amp;nbsp;&lt;SPAN&gt;x=name ~n address&amp;nbsp;~n;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I don't seem to be having any luck with trying these methods. &amp;nbsp;I must be missing something. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 14:03:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467665#M119405</guid>
      <dc:creator>Lost_Gary</dc:creator>
      <dc:date>2018-06-05T14:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate with Carriage Return and special formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467715#M119422</link>
      <description>&lt;P&gt;maybe if i wasn't calling it a carriage return I would have found this post (carriage return - how old am I?): &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Base-SAS-Programming/Adding-a-line-feed-character-when-joining-two-columns-into-one/td-p/69419" target="_self"&gt;https://communities.sas.com/t5/Base-SAS-Programming/Adding-a-line-feed-character-when-joining-two-columns-into-one/td-p/69419&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so, catx('0a'x,Name,Address) is just about what I was looking for, but How do I &lt;STRONG&gt;bold&lt;/STRONG&gt; just the name field as part of this new combined field? &amp;nbsp;Is that possible? &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 16:46:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467715#M119422</guid>
      <dc:creator>Lost_Gary</dc:creator>
      <dc:date>2018-06-05T16:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate with Carriage Return and special formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467723#M119426</link>
      <description>&lt;P&gt;Data set values do not contain any characteristics such as font face, weight, bold, underline or such.&lt;/P&gt;
&lt;P&gt;Style attributes can be applied to reporting procedures such as Proc Print, Tabulate, Report or the results of the data step Report Writing Interface.&lt;/P&gt;
&lt;P&gt;Or insert raw codes for the destination you are going to use such that the appropriate file viewer will apply the characteristic you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are looking to mix font weight in a single cell of a table perhaps the RWI approach would be best but I can't provide any specific examples other than are in the online documentation.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 17:06:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467723#M119426</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-06-05T17:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate with Carriage Return and special formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467822#M119437</link>
      <description>&lt;P&gt;You can use the &lt;A href="http://documentation.sas.com/?docsetId=odsug&amp;amp;docsetTarget=p11xia2ltavr8ln17srq8vn4rnqc.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;ODS Inline formatting functions&lt;/A&gt; to do this. Unfortunately the ODS EXCEL destination does not seem to honor this, please contact technical support. See the code below for an example. It works allright for PDF and HTML and tagsets.excelxp.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods escapechar="~";
data reportData;  
  set sashelp.class;
  length newColumn newcolum2 $ 64;

  newColumn = cats(
    "~{style [font_weight=bold]", name, "}"
    , "~{newline}"
    , catx(" ", age, sex)
  );

  newColum2 = catx("~{newline}", name, sex, age);
run;

ods excel file="c:\temp\sample.xlsx";
ods pdf file="c:\temp\sample.pdf";
ods tagsets.excelxp file="c:\temp\sample.xml";
proc print data=reportData;
run;
ods tagsets.excelxp close;
ods pdf close;
ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 19:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/467822#M119437</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2018-06-05T19:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: Concatenate with Carriage Return and special formatting</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/474200#M121798</link>
      <description>&lt;P&gt;My final code is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;new_var = catx("~{' ', style [font_weight=bold]", old_var1, '0a'x, "}"&lt;/P&gt;&lt;P&gt;, catx('0a'x,"~{style [font_weight=bold]", old_var2, "}"&lt;/P&gt;&lt;P&gt;, catx('0a'x, " ", old_var3)));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This formatting works within ODS Excel output that I needed. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you all for your help. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Jun 2018 18:17:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Concatenate-with-Carriage-Return-and-special-formatting/m-p/474200#M121798</guid>
      <dc:creator>Lost_Gary</dc:creator>
      <dc:date>2018-06-28T18:17:24Z</dc:date>
    </item>
  </channel>
</rss>

