<?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: PROC ODSTEXT, line wrapping and 139 in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/758683#M25205</link>
    <description>Hi, So you mentioned ”ODS TEXT=". But I am speaking of "PROC ODSTEXT".&lt;BR /&gt;Your solution seems to be a great use PROC ODSTEXT. Link:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsproc/p1tfjsx3ezqhacn1gqqsxqii7lpv.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsproc/p1tfjsx3ezqhacn1gqqsxqii7lpv.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You need a recent update of SAS 9.4 for it to work. I forget when it was&lt;BR /&gt;added to SAS 9.3 or 9.4.  Although I do not use ODS HTML very much any&lt;BR /&gt;more, I would be surprised if you could not use a PROC ODSTEXT with your&lt;BR /&gt;HTML output.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 02 Aug 2021 00:47:17 GMT</pubDate>
    <dc:creator>PhilC</dc:creator>
    <dc:date>2021-08-02T00:47:17Z</dc:date>
    <item>
      <title>PROC ODSTEXT, line wrapping  and 139</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/556928#M22730</link>
      <description>&lt;P&gt;&lt;BR /&gt;I was trying to output a long string using PROC ODSTEXT, but the lines wrapped in Excel.&amp;nbsp; I tried using "tagattr=wraptext:no",&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;no dice&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Desperate --&amp;nbsp;I started varying the length of the string... I found that there was&amp;nbsp;a threshold.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel
  file=  "&amp;amp;Folder\wraptext.xlsx";

  proc odstext;
    p "Discharges from (screen) and Investigation Records" 
       /style=[tagattr='WrapText:0' fontsize=14pt font_weight=bold];
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners wi";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with a";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appro";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appropria";
    p " ";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with ap";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with app";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appr";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appro";
run;

  ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;The magic number is&amp;nbsp;139.&amp;nbsp; (???)&amp;nbsp; So why?&amp;nbsp; .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 20:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/556928#M22730</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2019-05-07T20:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ODSTEXT, line wrapping  and 139</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/556963#M22731</link>
      <description>Hi:&lt;BR /&gt;  I believe that the TAGATTR specification was intended for use with ODS TAGSETS.EXCELXP. I think that starting in 9.4M4, the ODS EXCEL destination (which you're using) supports a FLOW= suboption that tells ODS EXCEL whether or not to insert carriage returns into long text strings based on the default column width that it wants to set.&lt;BR /&gt;&lt;BR /&gt;Cynthia</description>
      <pubDate>Tue, 07 May 2019 22:35:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/556963#M22731</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-05-07T22:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ODSTEXT, line wrapping  and 139</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/557076#M22732</link>
      <description>&lt;P&gt;If 139 then is based on the column width then its way off, and too long.&amp;nbsp; The above example uses the default Excel column width and 139 characters fill ~10 times the length of the cell.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I identify two different kinds of line wrapping going on here.&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;First, there is the line wrapping&amp;nbsp;ODS EXCEL implements (fixed with the&amp;nbsp;option Flow), this inserts carriage returns in to the data.&lt;/LI&gt;&lt;LI&gt;Second, the line wrapping done, or not done,&amp;nbsp;because of the specific Excel, XML schema level, tag and attribute &amp;lt;Alignment .. &lt;U&gt;ss:Wraptext=...&lt;/U&gt;&amp;gt;&amp;nbsp;set to "1" or "0"&lt;FONT color="#000000"&gt;.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, I think - it seems, that ODS Excel is placing a XML tag and attribute &amp;lt;Alignment .. &lt;U&gt;ss:WrapText="1"&lt;/U&gt;&amp;gt;&amp;nbsp;(method #2) conditional on the number of characters.&amp;nbsp;Which, to me, is&amp;nbsp;frustrating ... but not as much as the insertion of carriage returns (Method #1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really was hoping that tagattr=WrapText would be a supported feature of ODS EXCEL.&amp;nbsp; It's as basic a formatting option as "bold" in my opinion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And thanks for chiming in Cynthia.&amp;nbsp; And thanks for reading to my rants, future and past.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 12:10:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/557076#M22732</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2019-05-08T12:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ODSTEXT, line wrapping  and 139</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/557080#M22733</link>
      <description>&lt;P&gt;You're right, &lt;STRONG&gt;it is inserting a carriage return&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;but its also setting the WrapText="1" attribute at the same time.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was confused, but I'm still confused the same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So much about ODS makes sense to me, but not the decisions surrounding text wrapping in ODS Excel.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 12:43:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/557080#M22733</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2019-05-08T12:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ODSTEXT, line wrapping  and 139</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/557094#M22734</link>
      <description>&lt;P&gt;Cynthia,&lt;/P&gt;&lt;P&gt;I'm also sorry to say the Flow option actually forces line wrapping, that is the second kind.&amp;nbsp; Where it &lt;STRONG&gt;&lt;EM&gt;does &lt;/EM&gt;&lt;/STRONG&gt;stop the&amp;nbsp;inserting of carriage returns (method #1) it sets WrapText (method #2) for all cells its applied to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%MACRO Flow_option(option,suffix);
%if "&amp;amp;SUFFIX"eq"" 
  %then %let suffix=&amp;amp;option;

ods excel
  file=  "&amp;amp;Folder\wraptext &amp;amp;suffix..xlsx"
  options( FLOW="&amp;amp;option");

  proc odstext;
    p "Discharges from (screen) and Investigation Records" 
       /style=[tagattr='WrapText:0' fontsize=14pt font_weight=bold];
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appropriate HIPAA-compliant business agreements.";
    p " ";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners wi";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with a";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appro";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appropria";
    p " ";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with ap";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with app";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appr";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appro";
run;

  ods excel close;
%MEND;

/*Examplw with...*/
%Flow_option(DATA);
%Flow_option(HEADERS);
%Flow_option(ROWHEADERS);
%Flow_option(TABLES);
%Flow_option(TEXT);
%Flow_option(A1:A30,A1toA30);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am thinking about how to put this in a SAS Ballot.&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 13:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/557094#M22734</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2019-05-08T13:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ODSTEXT, line wrapping  and 139</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/758666#M25204</link>
      <description>&lt;P&gt;I am finding it effective to simply print in HTML when finished processing in SAS. I would like to write a paragraph after a procedure was run explaining the results. I'm finding I need to do an ods text =&amp;nbsp;statement for each line of prose output. That way I can control the font and&amp;nbsp; font size and be sure the prose stops soon enough so printed output will be sure to include it.&amp;nbsp;I read your response&amp;nbsp;and the use of the FLOW&amp;nbsp;option with ods Excel destination. Is there something similar I can do with automatic ods HTML&amp;nbsp;output?&amp;nbsp;I am yet to get this to work successfully. Thank you.&lt;BR /&gt;MM&lt;/P&gt;</description>
      <pubDate>Sun, 01 Aug 2021 18:57:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/758666#M25204</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-08-01T18:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ODSTEXT, line wrapping and 139</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/758683#M25205</link>
      <description>Hi, So you mentioned ”ODS TEXT=". But I am speaking of "PROC ODSTEXT".&lt;BR /&gt;Your solution seems to be a great use PROC ODSTEXT. Link:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsproc/p1tfjsx3ezqhacn1gqqsxqii7lpv.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsproc/p1tfjsx3ezqhacn1gqqsxqii7lpv.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;You need a recent update of SAS 9.4 for it to work. I forget when it was&lt;BR /&gt;added to SAS 9.3 or 9.4.  Although I do not use ODS HTML very much any&lt;BR /&gt;more, I would be surprised if you could not use a PROC ODSTEXT with your&lt;BR /&gt;HTML output.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 02 Aug 2021 00:47:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/758683#M25205</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2021-08-02T00:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ODSTEXT, line wrapping and 139</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/760167#M25212</link>
      <description>Thanks for replying. I'm doing better with proc odstext. It adjusts itself to whatever output type you specify. For example, it wraps very well in pdf files. MM</description>
      <pubDate>Sat, 07 Aug 2021 16:36:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/760167#M25212</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-08-07T16:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: PROC ODSTEXT, line wrapping  and 139</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/779301#M25455</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you test this example, you will notice that 128 characters are used (width=100%).&lt;/P&gt;&lt;P&gt;Adding one extra character actually create a line break character. So 130 characters in total. Add the len() Excel function to see it.&lt;/P&gt;&lt;P&gt;So to double the width, we can use the width=200% style attribute.&lt;/P&gt;&lt;P&gt;Having said that, I'm not sure where 128 limits is defined. Could it be in the style template? I haven't see it there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;ods excel file="&amp;amp;xxtest./reporting/ods_excel_test.xlsx";


proc odstext;
	p 'abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-123456';
	p 'abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-1234567';
	p 'abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-12345678';
	p 'abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-123456789';
	p 'abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-abcdefghi-123456789-';
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="procodstext.JPG" style="width: 928px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/65515i0D0BD8307A0E4080/image-size/large?v=v2&amp;amp;px=999" role="button" title="procodstext.JPG" alt="procodstext.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ps. ods excel options(flow='text') does not help in this example.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 12:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/PROC-ODSTEXT-line-wrapping-and-139/m-p/779301#M25455</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2021-11-09T12:35:50Z</dc:date>
    </item>
  </channel>
</rss>

