The SAS Output Delivery System and reporting techniques

setting font properties and fill color with tagsets.ExcelXP

Reply
N/A
Posts: 0

setting font properties and fill color with tagsets.ExcelXP

I need to have control of the Font properties such as font size, font type, etc. as well as the the background color and/or fill color of the entire Excel spreadsheet. With the following code the background or fill color is gray but I need to have it with no fill color with gridlines present . I have tried putting a style statement in the proc print for a given variable for testing defining the background as white but it did not include the gridlines as needed.


ods tagsets.excelxp file='C:\data\reports\report.xls'
options(sheet_name = 'REPORT'
autofilter = 'all'
Frozen_Headers = '1'
doc = 'help') ;

proc print data = report noobs; run;

ods tagsets.excelxp close;

Thanks.
SAS Super FREQ
Posts: 8,868

Re: setting font properties and fill color with tagsets.ExcelXP

Posted in reply to deleted_user
Hi:
You may actually need to design a STYLE template that does NOT have a background of white, but instead "undefines" or "turns off" the default background of gray.

I do have an example of a STYLE template like this, however, I am not on my machine at the moment. For help with a style template to get rid of the default colors used with Tagsets.ExcelXP, your best bet is to contact Tech Support.

cynthia
SAS Super FREQ
Posts: 8,868

Re: setting font properties and fill color with tagsets.ExcelXP

Posted in reply to deleted_user
Hi:
Back on my computer. Here's my example of a style template that works with ExcelXP -- This might be one place to start to experiment with your needed changes.
cynthia
[pre]
proc template;
define style styles.mymin;
parent = styles.Statistical;
replace Body from Body/
background=_undef_;
replace table from Output /
background=_undef_
foreground=_undef_
borderwidth=_undef_
font_size=10pt;
replace Header from Header /
background=_undef_
foreground=_undef_
borderwidth=_undef_
font_size=10pt;
replace RowHeader from RowHeader /
background=_undef_
foreground=_undef_
borderwidth=_undef_
font_size=10pt;
replace Data from Data /
background=_undef_
foreground=_undef_
borderwidth=_undef_
font_size=10pt;
end;
run;

ods tagsets.excelxp file='c:\temp\use_style.xls'
style=styles.mymin;

proc print data=sashelp.class;
run;
ods tagsets.excelxp close;
[/pre]
Occasional Contributor
Posts: 5

Re: setting font properties and fill color with tagsets.ExcelXP

Posted in reply to Cynthia_sas
I tried this myself and I keep getting a particular error message:

WARNING: Could not find parent template: Body.
WARNING: Could not find parent template: Data.
WARNING: Could not find parent template: Header.
WARNING: Could not find parent template: Rowheaded.

Seems like the default location isn't set for the style templates?
Occasional Contributor
Posts: 5

Re: setting font properties and fill color with tagsets.ExcelXP

Got it to work...doesnt help when you are using a OLD version of the tagset...lol
Ask a Question
Discussion stats
  • 4 replies
  • 604 views
  • 0 likes
  • 3 in conversation