BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I'm creating an Excel sheet using the ODS tagsets.ExcelXP.

But two things just won't work....

First the alignment of cells. Example:
[PRE]
PROC REPORT DATA=sashelp.class ;
COLUMN _ALL_ ;
DEFINE sex /STYLE(COLUMN)=[just=center] ;
RUN ;
[/PRE]
The style element "just=center" does nothing in the Excel sheet.

Second the wrapping of cells. It's standard with the column headers but not within a table.

Can anyone help me with this?

Thnx,
Thierry
3 REPLIES 3
Eric_SAS
SAS Employee
Which version of the Excelxp tagset are you using?

It should say in the log. If it doesn't say, then it is very old.

You can get the latest tagset here.

http://support.sas.com/rnd/base/ods/odsmarkup/
Cynthia_sas
Diamond | Level 26
Hi:
When I run this code:
[pre]
ods tagsets.excelxp file='c:\temp\try_cntr.xls'
style=sasweb
options(absolute_column_width="20,15,15" doc="Help");

proc report data=sashelp.class nowd
style(column)={just=center};
column name age height;
run;

ods tagsets.excelxp close;

[/pre]

I do see centering (in Excel 2007). Sometimes, you have to make the columns "bigger" in order to see the impact of centering.
I am running the version of the ExcelXP tagset template dated:
[pre]
NOTE: This is the Excel XP tagset (SAS 9.1.3, v1.75, 07/26/07). Add options
(doc='help') to the ods statement for more information.

[/pre]

(from my SAS log)
cynthia
deleted_user
Not applicable
Hi,

Thanks for your reply.

When I run Cynthia's code the centering doesn't work.
I guess it's because the old version of the tagsets I'm using.

I'm using the version:
[pre]
NOTE: This is the Excel XP tagset (SAS 9.1.3, v1.28, 08/29/05). Add options(doc='help') to the ods statement for more information.
[/pre]
I'll update the Tagset and try again.

The wrapping of cells? Is there an option for?

Thanks!
Thierry Message was edited by: TH

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 3052 views
  • 0 likes
  • 3 in conversation