BookmarkSubscribeRSS Feed
xxformat_com
Barite | Level 11

Hi,

 

Does anyone has any tips regarding ods excel row heights when it comes to proc odstext.

From my testing, row_heights options is not impacting proc odstext, only the ods text statement with the second argument.

 

Using the height= style attribute alone doesn't seem to have any impact.

Using the height= attribute with width= style attribute seems to have some effect. But I'm not clear on it actually work.

Here is my test code on this last point:

 

ods excel file="&xxtext./reporting/test.xlsx";
	
proc odstext;
	p 'Example: This is an example for testing purpose';
	p 'Example: This is an example for testing purpose' / style=[height=3cm];
	p 'Example: This is an example for testing purpose' / style=[width =3cm];
	p 'Example: This is an example for testing purpose' / style=[height=3cm width=3cm];
run;

proc odstext pagebreak=yes;
	p 'Example: This is an example for testing purpose';
	p 'Example: This is an example for testing purpose' / style=[height=48pt];
	p 'Example: This is an example for testing purpose' / style=[width =48pt];
	p 'Example: This is an example for testing purpose' / style=[height=48pt width=48pt];
run;

ods excel close;
3 REPLIES 3
Ksharp
Super User

cellheight ?

 

ods excel file="c:\temp\test.xlsx";
	
proc odstext;
	p 'Example: This is an example for testing purpose ';
	p 'Example: This is an example for testing purpose1' / style=[cellheight=10cm width=10cm];
	p 'Example: This is an example for testing purpose2' / style=[width =3cm];
	p 'Example: This is an example for testing purpose3' / style=[cellheight=10cm width=10cm];
run;


ods excel close;
xxformat_com
Barite | Level 11

Thanks. I first thought by reading your answer that cellheight was the solution but then realised that you didn't use a case where only cellheight was used.

After further research, it seems that height and width are not supposed to be supported by the excel destination.

Only pixel and percentages seems to be allowed for the width option if height needs to be used.

 

Actually, from my observations, width=100% affects the cells content: it defines the length of a string before applying a linebreak.

The only workaround I can think of is to use width=100% and height=5cm for example. But it may not be a solution in the long run.

 

sas_online_documentation_xxformat.JPG

sas_online_documentation_xxformat_width.JPG

printer.JPG

Cynthia_sas
SAS Super FREQ
CELLHEIGHT and HEIGHT are the same attribute. It was originally CELLHEIGHT and then an alias is HEIGHT. Same for CELLWIDTH and WIDTH being the same.
Cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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