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

Hello,

 

I've never used tagesets.excelXP format, so I am confusing how to adjust output table.

 

I used the below code to produce report and it looks like 

---------------------------------------

ods tagsets.ExcelXP path= '\\c\'
file= "Performance Weekly Report from &P_DATE to &C_DATE..xml" style=analysis;

proc report data=WORK.REPORT_V2;
col dispatcher_id 'hour released'n avg_nj_release avg_jeppesen_release avg_hardcopy;
define dispatcher_id / group style(Column)={width=2in just=center} 'ID';
define 'hour released'n / display 'HOUR RELEASED';
define avg_nj_release / display 'TOTAL RELEASE';
define avg_jeppesen_release / display 'JEP RELEASE';
define avg_hardcopy / display 'COPY';
run;
quit;


ods tagsets.ExcelXP close;

-------------------------------------------------------

ID HOUR RELEASED TOTAL RELEASE JEP RELEASE COPY
acecchet 0 0 0 0
  1 0 0 0
  2 0 0 0
  3 0 0 0
  4 0 0 0
  5 0 0 0
  6 2 0 0
  7 6.2 0 0
  8 3.6 0 0
  9 6.8 0 0
  10 5.8 0 0
  11 5.8 0 0
  12 3 0 0
  13 4 0 0
  14 1.33 0 0
  15 0 0 0
  16 0 0 0
  17 0 0 0
  18 0 0 0
  19 0 0 0
  20 0 0 0
  21 0 0 0
  22 0 0 0
  23 0 0 0

 

===============================

I would like to change the above table as below.1. Merge the first column based on ID name. 2. I would like to put background color in the column title (i.e row 1)

ID HOUR RELEASED TOTAL RELEASE JEP RELEASE COPY
acecchet 0 0 0 0
1 0 0 0
2 0 0 0
3 0 0 0
4 0 0 0
5 0 0 0
6 2 0 0
7 6.2 0 0
8 3.6 0 0
9 6.8 0 0
10 5.8 0 0
11 5.8 0 0
12 3 0 0
13 4 0 0
14 1.33 0 0
15 0 0 0
16 0 0 0
17 0 0 0
18 0 0 0
19 0 0 0
20 0 0 0
21 0 0 0
22 0 0 0
23 0 0 0

 

Would you please know how I can change these features?

 

Thank you for all comments in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Ksharp
Super User

It is weird. Can you give us some data to test .

Or try SPANROWS options :

 

proc report data=WORK.REPORT_V2 nowd spanrows;
col dispatcher_id 'hour released'n avg_nj_release avg_jeppesen_release avg_hardcopy;
define dispatcher_id / group style(Column)={width=2in just=center} 'ID';

View solution in original post

2 REPLIES 2
Ksharp
Super User

It is weird. Can you give us some data to test .

Or try SPANROWS options :

 

proc report data=WORK.REPORT_V2 nowd spanrows;
col dispatcher_id 'hour released'n avg_nj_release avg_jeppesen_release avg_hardcopy;
define dispatcher_id / group style(Column)={width=2in just=center} 'ID';

Alonzo
Calcite | Level 5

Thank you for the comment.

 

Spanrows command is working fine.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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