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;
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;
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.
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!
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.