BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tina1202
Fluorite | Level 6

I'm using a PROC REPORT within ODS EXCEL, and my TITLE rows on the Excel file are coming out with a very large row height.  The following code produces Row 1 with a height of 101, Row 2 with a height of 84, and Row 3 with a height of 67.   Any suggestions as to how to keep the title rows a reasonable height?

 

ODS EXCEL FILE = "&Out_Path/MAQ_&EXCEL_FILE_NAME..xlsx"

OPTIONS(SHEET_NAME = "Members"

EMBEDDED_TITLES='YES'

GRIDLINES='ON'

FROZEN_HEADERS='YES'

ABSOLUTE_COLUMN_WIDTH = '12, 50, 12, 12, 12'

 

);

TITLE J=L 'CUSTOMER: ' &POLICY_REPORT_TITLE. ' - ' &CUST_NAME.;

TITLE2 J=L 'COVERAGE DATES: ' &FIRSTSERV. ' - ' &LASTSERV.;

TITLE3 J=L 'REPORT RUN DATE: ' &TODAY_DT.;

PROC REPORT DATA=DEVDATA.MBRSUM MISSING NOWD SPLIT='*';

COLUMN PVRC GROUP MONTH EMPMONTHS MBRMONTHS;

DEFINE PVRC / DISPLAY 'PVRC' STYLE(COLUMN)={JUST=L};

DEFINE GROUP / DISPLAY 'PLAN' STYLE(COLUMN)={JUST=L TAGATTR='WRAPTEXT:NO' WIDTH=100%};

DEFINE MONTH / DISPLAY 'MONTH' F=$6. STYLE(COLUMN)={JUST=L};

DEFINE EMPMONTHS / DISPLAY 'EMPLOYEES' STYLE(COLUMN)={JUST=R TAGATTR='FORMAT:#,##0_)'};

DEFINE MBRMONTHS / DISPLAY 'MEMBERS' STYLE(COLUMN)={JUST=R TAGATTR='FORMAT:#,##0_)'} ;

RUN;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tina1202
Fluorite | Level 6

I tried the Height option.  It did change the font size from 11 to 12, but didn't change the row height problem.  What is "Meadow"?

 

I think I've solved my issue by using the ODS EXCEL option

TITLE_FOOTNOTE_NOBREAK='YES'.

 

The titles are coming out on one row without the row height being really big.

View solution in original post

2 REPLIES 2
ballardw
Super User

Have you tried specifying height?

such as

TITLE J=L height=12pt 'CUSTOMER: ' &POLICY_REPORT_TITLE. ' - ' &CUST_NAME.;

 

Your ODS style may be setting defaults for title size that are getting interpreted oddly by Excel. Another bit might be to try setting a style such as Meadow.

 

ODS EXCEL FILE = "&Out_Path/MAQ_&EXCEL_FILE_NAME..xlsx"

style=styles.meadow

OPTIONS(SHEET_NAME = "Members"

EMBEDDED_TITLES='YES'

GRIDLINES='ON'

FROZEN_HEADERS='YES'

ABSOLUTE_COLUMN_WIDTH = '12, 50, 12, 12, 12'

 

);

Tina1202
Fluorite | Level 6

I tried the Height option.  It did change the font size from 11 to 12, but didn't change the row height problem.  What is "Meadow"?

 

I think I've solved my issue by using the ODS EXCEL option

TITLE_FOOTNOTE_NOBREAK='YES'.

 

The titles are coming out on one row without the row height being really big.

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
  • 4598 views
  • 0 likes
  • 2 in conversation