- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You mean change column name or column label ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I would make a macro or use call execute to rewrite these label again . I am not familiar with proc template , don't know if it have such ability .
Xia Keshan
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
data _null_;
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;');
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
There is no need to replace the entire data set to change the meta data. That's a big hammer for such a small nail.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
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.
cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
proc report nofs data=sashelp.heart(obs=10) list;
columns _all_;
run;
options validvarname=upcase label=0;
proc report nofs data=sashelp.heart(obs=10) list;
columns _all_;
run;
options validvarname=any label=1;
