Hello Cynthia,
The Excel XP tagset version is (SAS 9.1.3, v1.28, 08/29/05).
What I intend to do sounds very simple but can't get it to work:
1. Remove the grid lines.
2. Print the 2 tables with 1pt border width and white cell background.
Here's the sample code:
/************ Code starts **********/
proc template;
define style Styles.Custom1 / store=work.styles;
parent = Styles.Default;
style fonts from fonts /
'TitleFont' = ("Arial, Helvetica, Helv",14pt,Bold Italic)
'TitleFont2' = ("Arial, Helvetica, Helv",12pt,Bold Italic)
'StrongFont' = ("Arial, Helvetica, Helv",12pt,Bold)
'EmphasisFont' = ("Arial, Helvetica, Helv",10pt,Italic)
'headingFont' = ("Arial, Helvetica, Helv",12pt,Bold)
'docFont' = ("Arial, Helvetica, Helv",10pt)
'footFont' = ("Arial, Helvetica, Helv",8pt);
replace color_list /
'fgB2' = blue /* links */
'fgB1' = darkmagenta /* visited links */
'fgA1' = black /* table cell foreground */
'bgA3' = lightgrey /* table cell background */
'bgA1' = lightgrey /* table background - shows through if cellspacing>0 */
'fgR' = darkblue /* row header foreground */
'bgR' = darkgray /* row header background */
'fgA2' = darkblue /* column header foreground */
'bgA2' = darkgray /* column header background */
'fgA' = navy /* foreground for everything else: notes, proc titles, ... */
'bgA' = white /* background for everything else: notes, proc titles, ... */
'bgP' = white /* page background */
;
replace Output from Container /
frame = box /* outside borders: void, box, above/below, vsides/hsides, lhs/rhs */
rules = all /* internal borders: none, all, cols, rows, group */
borderwidth = 1pt /* the width of the borders and rules */
bordercolor = color_list('fgA1') /* the color of the borders and rules */
cellpadding = 1pt /* the space between table cell contents and the cell border */
cellspacing = 0pt /* the space between table cells, allows background to show */;
* Leave code below this line alone ;
style Body from Body /
background = color_list('bgP');
style Contents from Contents /
background = color_list('bgP');
style Data from Data /
font = fonts("docFont");
style SystemTitle from SystemTitle /
font = fonts("TitleFont");
style SystemFooter from SystemFooter /
font = fonts("footFont");
style RowHeader from Header /
font = fonts("headingFont");
style Header from Header /
font = fonts("headingFont");
end;
run;
ODS LISTING CLOSE;
OPTIONS LeftMargin = .5in
RightMargin = .5in
TopMargin = .5in
BottomMargin = .5in;
ods tagsets.excelxp file="&rep_filename."
style=styles.custom1
options(embedded_titles='yes' sheet_interval='none'
width_fudge='0.75' sheet_name="&customer_number"
default_column_width="10,0,8,8,8,8,8,8,8"
FitToPage = 'yes' PAGES_FITWIDTH = '1' Pages_FitHeight = '100'
gridlines = 'yes'
)
;
ods tagsets.excelxp
options(embedded_titles='yes'
sheet_interval='none' sheet_name="&customer_number"
FitToPage = 'yes' PAGES_FITWIDTH = '1' Pages_FitHeight = '100'
gridlines = 'no'
);
proc report data=sashelp.shoes NOHEADER NOWD NOWINDOWS
;
column region product;
run;
proc report data=sashelp.shoes ;
run;
title;
ods tagsets.excelxp close;
/************ Code ends **********/
Also the margins don't seem to apply.
Please help.
Regards
Sanjay
... View more