When I open Excel, the default font is Calibri, font size 11. However, when I use ODS to create a report, it makes the entire sheet Arial, size 10. I don't want it to do that. I want to keep the entire sheet as Calibri, size 11.
I am able to make the table Calibri, size 11, but everything outside of that is still Arial, size 10. It looks silly. Why is SAS doing this? Is there a way to prevent it from defaulting to Arial, size 10 for the entire sheet? I just want to leave it as my default Excel settings.
Side note: PROC EXPORT doesn't mess with the Excel defaults. It remains as Calibri, size 11. But then my table looks boring, so that doesn't really help me either. My point with this is that SAS leaves the Excel default settings alone for PROC EXPORT but not through ODS. Why is that?
Thanks for your reply, Cynthia. I might not have been clear about what I want to happen. I don't think it's an issue of whether or not SAS has the font available to use. I'm able to make the individual table created by PROC REPORT to be in Calibri. And when I use ODS Excel to send it to Excel, the table remains in Calibri.
My problem is that the surrounding cells, the one SAS is not creating any data for, switches to Arial. I don't want the surrounding cells to change at all. I want them to remain in Calibri (which I know is available since it creates my table in Calibri). Just as they would if I were to do a PROC EXPORT, the entire sheet would remain in Calibri. However for some reason, ODS Excel changes the entire sheet to Arial, and then changes the tables created by the PROC REPORT to whatever font I tell it, in this case, Calibri.
I want the entire sheet to remain in Calibri. Not just the cells created by PROC REPORT. I know SAS can allow the entire sheet to remain in Calibri through PROC EXPORT. I want it to behave the same way using ODS Excel.
I suspect what you are talking about is the "fontscheme" of theme that Excel puts into the XLSX file. If you create an XLSX file using EXCEL and then use a ZIP extractor to pull out the individual files that are the contents of an XLSX file you can see that EXCEL has added some theme settings into the file "xl/theme/theme1.xml" that is part of the XLSX file.
I am not sure if SAS has any options to modify that.
You could try to figure out if you could replace that yourself. Perhaps there is some EXCEL menu item that lets you select the THEME to use? Or perhaps you can just edit the XML file and update the XLSX file with the new version.
Or probably a better solution would be to leave the SAS generated cells alone and if you need to use some of the output as part of a report you want to hand craft in Excel then just reference the values so you can format your reporting sheet in the modified XLSX file in anyway you want.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.