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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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