03-19-2015 04:45 PM
Is there a way to have all the column headings appear in uppercase on my ods output spreadsheet?
With help from sas communities I have been able to change the font size and make it bold, but now I want them all to appear in uppercase.
Can that be done?
03-19-2015 04:59 PM
That may require changing the LABEL of the variables involved or the text in the code generating the output if specifying the headings as part of define or table statements (or similar in other procs).
If you don't want to permanently change a label in a dataset almost every procedure recognizes the label statement as an option.
03-19-2015 07:12 PM
What procedure(s) are you using to create the spreadsheets? In some, like PROC TABULATE, you can code the column label in the procedure, while others use the LABEL for the variable or the variable name
03-20-2015 06:29 AM
I am using proc template to make a custom format for the font size, type, etc.
I just wanted to make the column label in all uppercase, right now in my code for all my tables I have used uppercase for all variables names but when I output some are still lower case or mixed case. I just want all the column labels to be in upper case.
This is only for the column labels, not the data in the table.
03-20-2015 07:14 AM
set sashelp.vcolumn (where=(libname="SASHELP" and memname="BMT")) end=last;
if _n_=1 then call execute('data work.bmt; set sashelp.bmt; label ');
call execute(' '||strip(name)||'="'||upcase(strip(label))||'"');
if last then call execute(';run;');
03-20-2015 08:25 AM
You did not say what kind of template you were using. I assume it is a style template. You can't do a change to upcase in the style template -- with the style template you are changing the style characteristics -- color, font, font-face of the column header -- but you cannot change the value of the header in a style template. While you might be able to make the type of change you want in a tagset template, that is a lot of work. AND, you have to know that your destination of choice even uses TAGSET templates. And, then there would be changing the tagset template, which I wouldn't recommend for something like this. it is hardly worth it, given the fact that most SAS procedures support the LABEL statement or have internal ways to alter the label -and- the fact that RW9 has provided you a nice bit of code that would, in fact, do what you want.
03-20-2015 09:19 AM
You mention variable names. If your column heading are simply the variable names you might be able to use OPTIONS VALIDVARNAME=UPCASE and achieve your goal. You would also need OPTIONS NOLABEL if your variables have labels.