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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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