BookmarkSubscribeRSS Feed
OS2Rules
Obsidian | Level 7
Hi All:

I'm using the ExcelXP tagset to create a number of multi-tab spreadsheets. The user has some very specific design requirements for these and I am having some problems getting them just right.

For example, the user wants to 'right justify' the word 'Subtotals:' on the sheet. I'm using a COMPUTE block to output the subtotal but I'm not sure how to justify the text in the cell. (I'm using a CALL DEFINE to provide font, background, and format already).

Is there a comprehensive list of the attributes that can be changed in the tagset using the 'CALL DEFINE'? Do I use the SAS format (".J=Right"), the HTML format ("align=right") or the XML format ("ss:Horisontal="Right")? If the attribute was not assigned to the "style", can it be altered by a CALL DEFINE statement?
2 REPLIES 2
Chevell_sas
SAS Employee
One way that this can be done is to apply the styles in the template. The style element created in the template can then be used with the STYLE= parameter of the CALL DEFINE statement.

proc template;
define style styles.test;
parent=styles.default;
style right from data /
font_size=8pt
background=red
just=right;
end;
run;

ods tagsets.excelxp file="temp1.xls" style=styles.test;

proc report data=sashelp.class nowd;
column name age sex height weight;

compute sex;
if sex="F" then call define(_col_,"style","style=right");
endcomp;

run;

ods tagsets.excelxp close;
Cynthia_sas
SAS Super FREQ
chevell:
I thought .r was already defined or will that not work for ExcelXP????
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
  • 672 views
  • 0 likes
  • 3 in conversation