BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
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
Cynthia_sas
SAS Super FREQ
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]
FaisalD
Calcite | Level 5
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?
FaisalD
Calcite | Level 5
Got it to work...doesnt help when you are using a OLD version of the tagset...lol

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
  • 4 replies
  • 1533 views
  • 0 likes
  • 3 in conversation