BookmarkSubscribeRSS Feed
sasiscool
Obsidian | Level 7

I am having a problem getting ODS excel to adjust the row height based off the specific text in that row. I have tried stripping all style elements out of the ods options  and within the proc report code itself, so that I can add things one by one to see if something is affecting the row height, but alas.  My Excel looks something like this.

 

  C1           C2                   C3 

1 xxxx       xxxxxxxxxx        xx

2 xx           xxx                    xx

3 xxx         x                        xx

 

I want to wrap the second collumn, which I can no problem ({tagattr="wrap:yes"};). The first row variable is too long, so i want to limit the width of C2. However, if I do that, the  1st row height needs to adjust so all the words in C2 row 1 actually appear. I feel as if when I previously set the 'row_heights' for the body to '0' in the ODS excel options statement, Excel automatically recognized that row 1 needed more height than row 2 or 3. However, now it does not.

 

One would think this is a common problem, so hopefully some one has a solution. gracias

2 REPLIES 2
ballardw
Super User

You should show your entire proc report code along with any ods options you are using.

 

You may want to specify some common elements with tagattr with columns appearing to the left of the problem cell. Proc report builds things from left to right and might not communicate a row height chage that appears in the second or third columns as it may conflict with how the left columns were presented. I say this as a guess as this is not something I worry about (Excel row height) and seldom use Proc Report.

Cynthia_sas
SAS Super FREQ

Hi,

  I do not observe the same behavior as you report. When I have wide text, my row heights adjust automatically based on the width of the cell, without needing to use any tagattr for wrapping. See the examples below -- the code is very simple.

 

cynthia

use_width_rows_adjust.png

 

and, for no wrapping at all, just adjust the widths... (using ODS EXCEL as the wrapper code):

 

no_wrapping.png

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 6571 views
  • 0 likes
  • 3 in conversation