BookmarkSubscribeRSS Feed
Marisa
SAS Employee

Hi all,

One customer is using ods tagsets excelxp.

He is using the option suppress_bylines="no" to get one excel sheet for each by variable value using the proc report code.

By default this sheet title(=the by variable value) is justify on the right, she would like to get it on the center or in the left side.

¿Do you know how to get it without using stiles?

I recommend her to do it using: options nocenter.

But in this way other tittles in the Excel report are justified on the left too.

And she would like only the by variable title on the left (or in the center)

Could you help?

This is the code that I used for make tests:

TestCode.png

Thanks,

Marisa.

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

  Using either SAS 9.2 or SAS 9.3, when I run your code, using TAGSETS.EXCELXP, the BYLINE in my output is centered, so if your customer is seeing RIGHT justification for the BYLINE, then they may want to open a track with Tech Support.

Otherwise, one way to achieve left justification is to move away from the BYLINE and use PROC REPORT's PAGE option and a COMPUTE block to write the equivalent of the by information.

cynthia

ods tagsets.excelxp file="c:\Temp\output_rev.xml"

    style=styles.sasweb

    options ( Sheet_Name="Summary CH"

    Orientation="Landscape"

    Embedded_Footnotes='Yes'

    Embedded_titles='Yes'

    Print_Footer_margin='0.3'

    orientation="landscape"

    fittopage="Yes");

   

proc report data=prueba nowd ;

column ('texto 'sex name weight height) ;

define sex / order noprint;

define name / order;

define weight /sum;

define height/ sum;

break after sex / page;

compute before _page_ / style={just=l font_weight=bold color=red};

  txt = 'Sex: '||sex;

  line txt $50.;

endcomp;

run;

  

ods tagsets.excelxp close;

Marisa
SAS Employee

Thanks Cysnthia for this answer.

I'm going to pass to the customer this infor.

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
  • 939 views
  • 4 likes
  • 2 in conversation