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

Does vjust=center work with tagsets.excelxp in a proc report table?

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  Have you tested VJUST=C? Did you use style overrides in your PROC REPORT code to try VJUST? What were the results?

  C (for center) is a valid value for JUST=; however, it is not a valid value for VJUST. If you want to impact vertical justification or alignment, the valid values are T (Top), M (Middle) and B (Bottom). Did you try VJUST=M???

  Look for the documentation topic entitled: "Detailed Information for All Style Attributes"

under the description of the VERTICALALIGN attribute (alias=VJUST), you will find the valid values.

http://support.sas.com/documentation/cdl/en/odsug/62755/HTML/default/viewer.htm#n19a4b40swc766n18qcz...

 

cynthia

View solution in original post

7 REPLIES 7
Cynthia_sas
SAS Super FREQ

Hi:

  Have you tested VJUST=C? Did you use style overrides in your PROC REPORT code to try VJUST? What were the results?

  C (for center) is a valid value for JUST=; however, it is not a valid value for VJUST. If you want to impact vertical justification or alignment, the valid values are T (Top), M (Middle) and B (Bottom). Did you try VJUST=M???

  Look for the documentation topic entitled: "Detailed Information for All Style Attributes"

under the description of the VERTICALALIGN attribute (alias=VJUST), you will find the valid values.

http://support.sas.com/documentation/cdl/en/odsug/62755/HTML/default/viewer.htm#n19a4b40swc766n18qcz...

 

cynthia

gzr2mz39
Quartz | Level 8

vjust and verticalalign don't seem to be working with tagsets.excelxp.

Any suggestions?

Thank you.

ods tagsets.excelxp file="C:\summary_&date1..xls"
style=journal
options(frozen_headers='1'
   autofit_height='yes'
   zoom='90'
          absolute_column_width='12,8,8,8,8'  

          sheet_interval='none' sheet_name='Claims by Month')
;

proc report data=claims_tots nowd contents="Claims" out=test
style(header)=[verticalalign=m font_weight=bold background=cxA3D57D font_size=11pt font_face='Arial Unicode MS'] split='00'x
style(column)={verticalalign=m font_size=11pt font_face='Arial Unicode MS'};
options missing='0';
column mdoi mdoic ydoi, (z_tot osha_incident);
define mdoi /group order=data noprint;
define mdoic /computed 'Month' width=10 style(column)={just=l};
define ydoi /across '' width=5 style=[font_size=13pt FONT_WEIGHT=BOLD just=c] format=yearf. order=data;
define z_tot /analysis 'All Claims' style(column)={verticalalign=m background=cxE8E8E8 just=c};
define osha_incident /analysis 'Incident Only' style(column)={just=c};
rbreak after /summarize;
compute mdoic /CHAR length=10;
  if mdoi ^= . then mdoic = put(mdoi,mof.);
  else mdoic = ' ';
  if _break_='_RBREAK_' then mdoic = 'Total';
  if mdoic in ('Total') then call define(_row_,"style","style=[background=cx8DB4E2 font_size=12pt font_weight=bold]");
  if mdoi in ("&currmonth.") then call define(_row_,"style","style=[background=cxE4CD94]");
endcomp;
run;

Cynthia_sas
SAS Super FREQ

In my test program, it worked for me. See screen shot. I used SPANROWS to make the AGE columns higher and I used a long text string for NAME in order to be able to see the impact of vjust.

cynthia

ods tagsets.excelxp file='c:\temp\vjust.xml'

    style=sasweb;

      

proc report data=sashelp.class nowd spanrows split='/'

  style(header)={vjust=m};

  column age name sex  height;

  define name / 'Long/label/for/Name';

  define age / order style(column)={vjust=m just=c};

  define height / display

         style(column)={just=c cellwidth=1in};

run;

    

ods _all_ close;


vjust_m_report.jpg
gzr2mz39
Quartz | Level 8

It looks like my version of tagsets.excelxp needed to be updated.

After downloading the newer version vjust=m worked fine.

Thank you.

IJU
Fluorite | Level 6 IJU
Fluorite | Level 6

Dear Cynthia,

This post is 1.5 years old but I am experiencing similar problems with vertical alignment using ExcelXP.

I tried your code to generate vjust.xml as-is but did not get vertical alignment ‘center’.  It is still ‘bottom’.

The same issue with ‘top’ using your sample code from the https://communities.sas.com/message/124812#124812 post.

I am working with SAS 9.2 (TS2M0) on the NET_ASRV  platform. Here is an ExcelXP version from a SAS log:

NOTE: This is the Excel XP tagset (Compatible with SAS 9.1.3 and above, v1.94, 09/09/12).

What is wrong with a vjust option? Is it an  ExcelXP version?

Thank you,

–IJU

Cynthia_sas
SAS Super FREQ

Hi:

  I no longer have SAS 9.2 to test with. I am using SAS 9.4 and Excel 2013 and my version of ExcelXP was v1.129 and my results are the same now as when I posted the above code (given the date of the earlier post, I was probably using SAS 9.3, but I don't know what version of the ExcelXP tagset). I suspect that there is nothing wrong with the VJUST option. I also suspect that the issue is with either your version of Excel or your version of the tagset template. Note that the most current version of the tagset template is version 1.130 from August 2013.

  I would suggest that you open a track with SAS Tech Support - -they have SAS 9.2 to test with and they can verify that your code is working as intended in that version of SAS and/or they can help you get the output the way you want.

cynthia

IJU
Fluorite | Level 6 IJU
Fluorite | Level 6

Hi Cynthia,

I downloaded the latest, 1.130 version of ExcelXP and tested it by saving into WORK.TEMPLAT.

The vertical alignment works now! 

Here is an explanation for this issue:

The latest change log record in our permanent ExcelXP version 1.94 is

“set $changelog[] '.v1.94, 09/2009/2008';”

The 1.130 version code contains the following change log record:

set $changelog[] '.v1.104, 04/02/2009'

set $changelog[] 'Added vjust as an honored over ride.';

set $changelog[] '-';

Now we have to find out if it is possible to permanently upgrade ExcelXP to the new 1.130 version in our old SAS v9.2.

Thank you.

-IJU

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
  • 7 replies
  • 7909 views
  • 1 like
  • 3 in conversation