Date: Mon, 16 Apr 2007 05:17:07 -0700
Reply-To: sbarry@SBBWORKS.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Scott Barry <sbarry@SBBWORKS.COM>
Organization: http://groups.google.com
Subject: Re: A_QUESTION: ods html table
In-Reply-To: <200704161055.l3GAkxsI018013@malibu.cc.uga.edu>
Content-Type: text/plain; charset="iso-8859-1"
On Apr 16, 6:55 am, gerhard.hellrie...@T-ONLINE.DE (Gerhard
Hellriegel) wrote:
> If you use HTML as ODS-destination, what should SAS do? In HTML there
> seems to be no other way to pass some special chars to the browser to
> display (not to treat them as "triggers") than masking them. Some things
> like <,>,&,[,], ... are used in HTML syntax to do something, not to be
> displayed. If you need them anyway to be displayed, you must "tell" HTML
> (or better: the browser), that in that special case the use of & is NOT a
> trigger, but it is to be displayed on the screen.
> I see no other possibility to tell that to the browser. Maybe some HTML
> gurus could tell you another trick, but for me with my small HTML skill
> it's the only way. And if you pass things like 'a > b' or '&text' to HTML,
> unexpected results might come up!
> Gerhard
>
> On Mon, 16 Apr 2007 11:55:29 +0200, minze su <slhapp...@GMAIL.COM> wrote:
> >Thank you. it works. This is a good solution. But Can you give me a way
> that
> >dont let sas change & to & Thank you again!
>
> >Minze
>
> >On 4/16/07, Robert Bardos <bard...@ansys.ch> wrote:
>
> >> Minze,
>
> >> does this give you what you want?
>
> >> gaf30='<PRE> 25% (2)</PRE>';
>
> >> or similar to your example
>
> >> gaf30='<PRE>' ||
> >> put(percent,5.0) ||
> >> '% ' ||
> >> put(count,1.0) ||
> >> ')</PRE>'
> >> ;
>
> >> Robert
>
> >> > -----Urspr?he Nachricht-----
> >> > Von: SAS(r) Discussion
> >> > [mailto:S...@LISTSERV.UGA.EDU]Im Auftrag von
> >> > minze su
> >> > Gesendet: Montag, 16. April 2007 10:14
> >> > An: S...@LISTSERV.UGA.EDU
> >> > Betreff: Re: A_QUESTION: ods html table
>
> >> > Dear all:
>
> >> > Sorry, I dont quite understand. Maybe I should
> >> > clarify my question. I
> >> > found ods html to excel changes two blanks or more to
> >> > one blank, then I use
> >> >   to html display more blanks. But ods html change
> >> > '&' to '&' I dont
> >> > want to do that. I want exactly a '&'. How can I do that?
>
> >> > my code is as follows:
>
> >> > *
>
> >> > data* gaf30
>
> >> > gaf30=put(PERCENT,*5.0*)||'% '
> >> > ||' ('||put(COUNT,*1.0*)||')'
>
> >> > run;
>
> >> > ***output;
>
> >> > ods html file="c:\slidepf.xls" style=styles.default;
>
> >> > title "slide pf";
> >> > *
>
> >> > proc* *print* data=gaf30;
> >> > *
>
> >> > run*;
>
> >> > ods html close;
>
> >> > Best regards,
>
> >> > Minze
There most definitely is a solution -- using a custom template style
generated with PROC TEMPLATE, and coding the PRESERVEHTML attribute.
Also, for a straight PROC PRINT, I mention the VAR statement keyword
parameter STYLE= coding, shown below.
data;
a='a b';
ods html file="c:\data\test.html";
ods listing close;
proc print;
var a / style={asis=yes};
run;
FAQ # 3235
Q: How can I keep the leading and trailing blank spaces in my ODS HTML
titles and footnotes?
http://support.sas.com/faq/032/FAQ03276.html
Regards,
Scott Barry
SBBWorks, Inc.
|