BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
PhilC
Rhodochrosite | Level 12

Why does the second and third lines wrap, despite using "tagattr=wraptext", while the first one does not wrap?

 

I expect all three lines not to wrap.  Do you have any ideas about what I am doing incorrectly?

 

ods excel
  file=  "&Folder\wraptext.xlsx" 
  options (
    Absolute_column_width = '  140pt, 59pt'
    /*I need these column widths for this to work with 
    a table that I will add after this procedure.*/
    );

  Title;footnote;
  proc odstext;
    p "Discharges from (screen) and Investigation Records" 
       /style=[tagattr='wraptext:no' 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."
       /style=[tagattr='wraptext:no' ];
    p "This file may contain information associated with pre-trial investigations.  It is exempt from public record disclosure unless cleared by the appropriate, qualified record custodian."
       /style=[tagattr='wraptext:no' ];
  run;

  ods excel close;

 

Lets identify two different kinds of line wrapping. 

  1. First, there is the line wrapping ODS EXCEL implements (fixed with the option Flow)
  2. Second, the line wrapping done, or not done, because of the specific Excel, XML schema level, formatting code "WrapText".

The latter line wrapping is happening, but I am truly only concerned about the former type of line wrapping.

 

--- SAS Software ---
  SAS Enterprise Guide version: 7.15 HF7 (7.100.5.6177)
  SAS System version: 9405.100.22960.39165

1 ACCEPTED SOLUTION

Accepted Solutions
PhilC
Rhodochrosite | Level 12

Too slow.

 

Ok I figured this out.  I started varying the length of the string and I found that there was a threshold.

 

ods excel
  file=  "&Folder\wraptext.xlsx" 
  options (
    Absolute_column_width = '  140pt, 59pt'
    );

  Title;footnote;
  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";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with approp";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appropr";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appropri";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appropria";

run;

  ods excel close;


The magic number 139.  (???)  So why?  I wonder.

View solution in original post

2 REPLIES 2
PhilC
Rhodochrosite | Level 12

Too slow.

 

Ok I figured this out.  I started varying the length of the string and I found that there was a threshold.

 

ods excel
  file=  "&Folder\wraptext.xlsx" 
  options (
    Absolute_column_width = '  140pt, 59pt'
    );

  Title;footnote;
  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";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with approp";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appropr";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appropri";
    p "This file contains HIPAA protected healthcare information.  It is intended for use within this agency and with authorized partners with appropria";

run;

  ods excel close;


The magic number 139.  (???)  So why?  I wonder.

PhilC
Rhodochrosite | Level 12

Got a badge for answering my own question.  I'm somewhere between "Yoohoo" and "wait -- what's going on here?"

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3572 views
  • 1 like
  • 1 in conversation