Hello,
I have been trying to create a Excel using PROC report. I am not attaching my actual code due to Non-disclosure. But let me try to explain using a demo.
Data new;
Text = "Income Multiples";
run;
Proc report data=new nowd noheader;
column text;
define text /display;
run;
I am using ODS tagsets Excelxp for this. My desired output in the excel should be something like this, "Income Multiple", which should appear in one Cell only. I am working on Version 9.2. I have no clue how to do this. I know I can apply style(column)={foreground=<color>}. But I have to present the same in 2 different colors. Need help on this.
Hello @RW9, I found a solution. Albeit the concept is same, just the syntax is different. It should be something like this.
text="^S={foreground=red}Income^S={} ^S={foreground=blue}Multiples^S={}";
I found the solution in this paper by Mr. Derek Morgan, Washington University Medical School, St. Louis, MO. Here is the link.
There is something called "inline formatting" where with the use of an escapechar you add in formatting:
http://support.sas.com/resources/papers/proceedings09/222-2009.pdf
So maybe:
ods escapechar="^";
data new;
text="^{style [foreground=red]}Income ^{style [foreground=blue]}Multiples";
run;
proc report...
Not tested.
Hello RW9,
Tested this one yesterday, but it seems not enough, something else is probably also needed.
Anyways I am exploring the inline formatting thing you just specified I am looking into it.
I will post the solution if I get one.
thanks for giving me some direction.
Hello @RW9, I found a solution. Albeit the concept is same, just the syntax is different. It should be something like this.
text="^S={foreground=red}Income^S={} ^S={foreground=blue}Multiples^S={}";
I found the solution in this paper by Mr. Derek Morgan, Washington University Medical School, St. Louis, MO. Here is the link.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.