BookmarkSubscribeRSS Feed
data_null__
Jade | Level 19

I want my first two column headers to look like this as done by tagsets.sasreport13.

4-9-2015 11-28-45 AM.png

With tagsets.excelxp I get this.

4-9-2015 11-31-29 AM.pngI

I can merge it myself and save it and see the following but I don't know if I can get this with options in tagsets.excelxp

   <Row ss:AutoFitHeight="0">

    <Cell ss:MergeDown="1" ss:StyleID="m47835816"><Data ss:Type="String">name</Data></Cell>

    <Cell ss:MergeDown="1" ss:StyleID="m47835836"><Data ss:Type="String">sex</Data></Cell>

    <Cell ss:MergeAcross="2" ss:StyleID="m47835776"><Data ss:Type="String">span</Data></Cell>

   </Row>

Forgot to add the code:

ods tagsets.excelxp path='~' file='classmrg.xml' style=styles.sansprinter;
proc report data=sashelp.class;
   column
      (
"name" name)
      (
'sex' sex)
      (
'span' age height weight);
   define name / ' ';
  
define sex  / ' ';
  
run;
ods tagsets.excelxp close;

Message was edited by: data _null_

2 REPLIES 2
Ksharp
Super User

As fas as I know, You can't . The only way I can think is changing XML source code.

Maybe Cynthia could have a solution.

Xia Keshan

Cynthia_sas
SAS Super FREQ

Hi:

PROC REPORT does NOT merge header cells. PROC REPORT writes one report row at a time. So when it is writing the row which needs to contain "span", PROC REPORT has no visibility of any rows that came before or any rows to come after. So you will not be able to achieve the "merged" header the way you envision. TAGSETS.SASREPORT13 is the default ODS destination for Enterprise Guide. It is SASReport XML and is not like TAGSETS.EXCELXP. So you can't compare how they work or ask one to work like the other.

This is the closes you get using PROC REPORT and TAGSETS.EXCELXP.

Proc_report_not_merge_header_cells.png

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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