I need to output a sas report under proc report with ods excel and font_face="Calibri" my report does not come out in Calibri!!!
is there an exolication or solution how to divert the problem
data AA;
infile datalines dlm=',';
input Stn $ avg1 avg2 avg3 avg4;
datalines;
NE,11111,11111,11110,5555
NW,22222,11119,22223,2322
SE,33333,33333,33331,2309
SW,44444,44444,44444,1100
;
run;
ods excel file='';
proc report data=AA
style(report)={font_face="Calibri"}
style(header)={font_face="Calibri"}
style(column)={font_face="Calibri"};
column stn ("var1" avg1 avg2) ("var2" avg3 avg4);
define stn / order;
define avg1 /analysis;
define avg2 / analysis;
define avg3 / analysis;
run;
ods excel close;
@snip - Did you read @Cynthia_sas 's response? Calibri is a Windows Truetype font. If your SAS isn't running on Windows then it is unlikely you will have this font. This program will list your SAS ODS fonts:
proc registry listhelp startat='ods\fonts'; run;
When I run that code the appropriate cells have Calibri as the font.
If you are running SAS with some networked version, Enterprise Guide or SAS on demand and the server that actually executes the code does not have the font installed then it cannot create documents with that font and will use the font defined in the current ODS style.
If the system viewing the result doesn't have the font then likely another font is substituted.
@ballardw is correct. If the server or rendering system does not have Calibri, then another font is substituted. My understanding was that fonts like Calibri are Windows TrueType fonts and if, for example, your system server is a Linux or Unix server, they may not have any Windows fonts loaded. Do fonts that are "common" fonts like Courier or Times New Roman work? Can you check with your system administrator that Calibri is available?
Cynthia
I have the impression that my airlock does what it wants...
yesterday I told Calibri he was sending me mail. and today for courier, new time calibri it takes me out of Albany AMT..
I don't understand why each time he changes the font. I use style(report)=...
@snip wrote:
I have the impression that my airlock does what it wants...
yesterday I told Calibri he was sending me mail. and today for courier, new time calibri it takes me out of Albany AMT..
I don't understand why each time he changes the font. I use style(report)=...
Sounds like a garbled AI wrote this.
I said that yesterday I executed my sas code with a "Calibri" style, sas gave me my report in Courier, and today I executed the same code..., the report that sas gave me released it was in Albany AMT,
so, I didn't understand why this bug
Without actual code it is hard to tell.
One thing that persists across SAS sessions is the ODS STYLE setting. Changing the general Style setting will change many things graph colors, font sizes, font family, background colors. So a change in style will do such. IF your SAS admin is changing styles on you, or you experiment without realizing this then unexpected results.
You can override your default ODS style for different destinations as well, just add a Style=<some style name> to an ODS destination.
Ods excel file="<some file name>" style=htmlblue;
or
Ods excel file="some other filename" style=meadow;
are likely to result in different appearance. You can also for some procedures change the general style just for that procedure. The report procedures Print, Report and Tabulate for example with the Style option.
Is there a way to check if my sas has Calibri or not?
@snip - Did you read @Cynthia_sas 's response? Calibri is a Windows Truetype font. If your SAS isn't running on Windows then it is unlikely you will have this font. This program will list your SAS ODS fonts:
proc registry listhelp startat='ods\fonts'; run;
Thank's
I tested and I don't have Calibri under sas
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.
Ready to level-up your skills? Choose your own adventure.