LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 16 Apr 2007 05:39:27 -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
Comments: To: sas-l@uga.edu
In-Reply-To:  <1176725827.206373.191400@n59g2000hsh.googlegroups.com>
Content-Type: text/plain; charset="iso-8859-1"

On Apr 16, 8:17 am, sba...@sbbworks.com wrote: > 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 &amp; 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 > > >> > &nbsp to html display more blanks. But ods html change > > >> > '&' to '&amp;' 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*)||'% ' > > >> > ||'&nbsp;&nbsp;('||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.

Sorry....my mistake with the bogus PROC TEMPLATE reference. Once, again, from an earlier post, here's the details with an example (for those who choose not to read the DOC by following the link):

FAQ # 3383 Q: In ODS HTML output, how can I get HTML tags to function as code and not appear as text?

http://support.sas.com/faq/033/FAQ03383.html

proc template; define style styles.test; parent=styles.default; replace Document from Container / htmldoctype = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final// EN">' htmlcontenttype = 'text/html' protectspecialchars = off linkcolor = colors('link2') visitedlinkcolor = colors('link1'); end; run; ods listing close; ods html file="c:\data\test.html" style=styles.test; data ; a='a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;b'; proc print u; run; ods html close; ods listing;

Scott Barry SBBWorks, Inc.


Back to: Top of message | Previous page | Main SAS-L page