DATA Step, Macro, Functions and more

ODS Excel PROC REPORT TITLE Formatting

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 8
Accepted Solution

ODS Excel PROC REPORT TITLE Formatting

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;

 


Accepted Solutions
Solution
‎05-16-2018 11:54 AM
Occasional Contributor
Posts: 8

Re: ODS Excel PROC REPORT TITLE Formatting

[ Edited ]

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


All Replies
Super User
Posts: 13,542

Re: ODS Excel PROC REPORT TITLE Formatting

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'

 

);

Solution
‎05-16-2018 11:54 AM
Occasional Contributor
Posts: 8

Re: ODS Excel PROC REPORT TITLE Formatting

[ Edited ]

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.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 99 views
  • 0 likes
  • 2 in conversation