<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Delete line break after header h1 in SAS9.1.3 in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Delete-line-break-after-header-h1-in-SAS9-1-3/m-p/75642#M8587</link>
    <description>Hi Cynthia,              &lt;BR /&gt;
                  Thank you for your prompt reply. We were using the ODS HTML3 as you had suggested. I was assigned the responsibility to  make this work with HTML4.  &lt;BR /&gt;
&lt;BR /&gt;
Let me try to explain you what the problem is. When using SAS8.2 it does &lt;BR /&gt;
not treat this as a header. SAS 8.2 treats  this something like this: &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
TD ALIGN=LEFT bgcolor="#E0E0E0"&amp;gt;&lt;FONT face="Times" size="2" color="#002288"&gt;&lt;I&gt;test1&lt;/I&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
TD ALIGN=LEFT bgcolor="#E0E0E0"&amp;gt;&lt;FONT face="Times" size="2" color="#002288"&gt;&lt;I&gt;test2&lt;/I&gt;&lt;/FONT&gt;
&lt;BR /&gt;
  On the other hand SAS 9 defaults it as a h1 header like this. &lt;BR /&gt;
h1 class="SystemTitle"&amp;gt;test1 h1 &lt;BR /&gt;
&lt;BR /&gt;
h1 class="SystemTitle"&amp;gt;test2 h1 &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
As a header h1 is used I believe it might be creating a padding which is causing an extra line break between the two fields. i.e, there is a line break in the .xls sheet between title1 and title2 as seen below&lt;BR /&gt;
&lt;B&gt;&lt;I&gt; title1 &lt;/I&gt;&lt;/B&gt; &lt;BR /&gt;
&lt;B&gt;&lt;I&gt; title2 &lt;/I&gt;&lt;/B&gt; &lt;BR /&gt;
&lt;BR /&gt;
Is there a way we can make this work with HTML4. I mean, even if h1 header is used can we suppress the blank line  in the excel sheet whenever the style &lt;SYSTEMTITLE&gt; is being used?&lt;/SYSTEMTITLE&gt;</description>
    <pubDate>Mon, 02 Mar 2009 21:43:43 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2009-03-02T21:43:43Z</dc:date>
    <item>
      <title>Delete line break after header h1 in SAS9.1.3</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Delete-line-break-after-header-h1-in-SAS9-1-3/m-p/75640#M8585</link>
      <description>Hi,&lt;BR /&gt;
&lt;P&gt;I am new to SAS and to this group. I have been modifying templates so that they&lt;BR /&gt;
 &lt;BR /&gt;
produce the same output in SAS9.1.3 as they  did in SAS8.2. I have used the MSOffice2K &lt;BR /&gt;
tagset&lt;BR /&gt;
 and have almost got the desired result. The issue that I now have is, I have a &lt;BR /&gt;
&lt;BR /&gt;
line break after each header h1.&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
I have defined stylesheets as below:&lt;BR /&gt;
&lt;BR /&gt;
proc template;&lt;BR /&gt;
define style audit;&lt;BR /&gt;
parent=styles.default;&lt;BR /&gt;
&lt;BR /&gt;
style SystemTitle /&lt;BR /&gt;
font_size = 10pt&lt;BR /&gt;
font_weight = bold&lt;BR /&gt;
foreground = #002288&lt;BR /&gt;
font_face = Times&lt;BR /&gt;
Just = L&lt;BR /&gt;
font_style = Italic;&lt;BR /&gt;
..&lt;BR /&gt;
.&lt;BR /&gt;
.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
----   avi.sas is the main program and its below. &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ods tagsets.MSOffice2K file='New_output.xls' style=audit&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
title1 'test1';&lt;BR /&gt;
title2 'test2';&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
......&lt;BR /&gt;
....&lt;BR /&gt;
...&lt;BR /&gt;
..&lt;BR /&gt;
.;&lt;BR /&gt;
&lt;BR /&gt;
Proc print data=sashelp.class;&lt;BR /&gt;
Run;&lt;BR /&gt;
ods tagsets.MSOffice2K close;&lt;BR /&gt;
&lt;BR /&gt;
When I open the code for the excel sheet (New_output.xls') this is what I see for the entry (Note: I have taken out the tags for h1 below as it is treating it as a header)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
h1 class="SystemTitle"&amp;gt;test1 h1  &lt;BR /&gt;
h1 class="SystemTitle"&amp;gt;test2 h1 &lt;BR /&gt;
...&lt;BR /&gt;
..&lt;BR /&gt;
.&lt;BR /&gt;
&lt;BR /&gt; &lt;BR /&gt;
In the excel sheet I have a line break between 'test1' and 'test2' and so on.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
How can I do away with this? I have spent quiet some time researching this before I have come to take help from the group. &lt;BR /&gt;
&lt;BR /&gt;
Any advise would be appreciated!&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance,&lt;BR /&gt;
 Cool_avi

Message was edited by: Cool_avi</description>
      <pubDate>Thu, 26 Feb 2009 18:33:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Delete-line-break-after-header-h1-in-SAS9-1-3/m-p/75640#M8585</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-02-26T18:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line break after header h1 in SAS9.1.3</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Delete-line-break-after-header-h1-in-SAS9-1-3/m-p/75641#M8586</link>
      <description>Hi:&lt;BR /&gt;
  I'm not exactly sure I understand the problem. However, if you really liked the kind of HTML written by SAS 8.2, and it gave you the header behavior that you desire, then one simple solution is to switch -back- to that form of HTML.&lt;BR /&gt;
&lt;BR /&gt;
  In SAS 8, ODS produced HTML 3.2 compliant HTML tags. In SAS 9, ODS produces HTML 4.01 compliant HTML tags. ODS MSOFFICE2K produces Microsoft-HTML compliant tags. To "get back" to the older version of HTML, you only need to do this:&lt;BR /&gt;
            &lt;BR /&gt;
[pre]&lt;BR /&gt;
ods html3 file='ht3_out.html' style=sasweb;&lt;BR /&gt;
  ** ... your code ;&lt;BR /&gt;
ods html3 close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
             &lt;BR /&gt;
cynthia&lt;BR /&gt;
[/pre]</description>
      <pubDate>Fri, 27 Feb 2009 17:40:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Delete-line-break-after-header-h1-in-SAS9-1-3/m-p/75641#M8586</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-02-27T17:40:59Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line break after header h1 in SAS9.1.3</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Delete-line-break-after-header-h1-in-SAS9-1-3/m-p/75642#M8587</link>
      <description>Hi Cynthia,              &lt;BR /&gt;
                  Thank you for your prompt reply. We were using the ODS HTML3 as you had suggested. I was assigned the responsibility to  make this work with HTML4.  &lt;BR /&gt;
&lt;BR /&gt;
Let me try to explain you what the problem is. When using SAS8.2 it does &lt;BR /&gt;
not treat this as a header. SAS 8.2 treats  this something like this: &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
TD ALIGN=LEFT bgcolor="#E0E0E0"&amp;gt;&lt;FONT face="Times" size="2" color="#002288"&gt;&lt;I&gt;test1&lt;/I&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
TD ALIGN=LEFT bgcolor="#E0E0E0"&amp;gt;&lt;FONT face="Times" size="2" color="#002288"&gt;&lt;I&gt;test2&lt;/I&gt;&lt;/FONT&gt;
&lt;BR /&gt;
  On the other hand SAS 9 defaults it as a h1 header like this. &lt;BR /&gt;
h1 class="SystemTitle"&amp;gt;test1 h1 &lt;BR /&gt;
&lt;BR /&gt;
h1 class="SystemTitle"&amp;gt;test2 h1 &lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
As a header h1 is used I believe it might be creating a padding which is causing an extra line break between the two fields. i.e, there is a line break in the .xls sheet between title1 and title2 as seen below&lt;BR /&gt;
&lt;B&gt;&lt;I&gt; title1 &lt;/I&gt;&lt;/B&gt; &lt;BR /&gt;
&lt;B&gt;&lt;I&gt; title2 &lt;/I&gt;&lt;/B&gt; &lt;BR /&gt;
&lt;BR /&gt;
Is there a way we can make this work with HTML4. I mean, even if h1 header is used can we suppress the blank line  in the excel sheet whenever the style &lt;SYSTEMTITLE&gt; is being used?&lt;/SYSTEMTITLE&gt;</description>
      <pubDate>Mon, 02 Mar 2009 21:43:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Delete-line-break-after-header-h1-in-SAS9-1-3/m-p/75642#M8587</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-02T21:43:43Z</dc:date>
    </item>
    <item>
      <title>Re: Delete line break after header h1 in SAS9.1.3</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Delete-line-break-after-header-h1-in-SAS9-1-3/m-p/75643#M8588</link>
      <description>Hi:&lt;BR /&gt;
  Some comments:&lt;BR /&gt;
  You are NOT creating an XLS file. You are creating an HTML file that Excel knows how to open and render. Each of those files conforms to an HTML specification and Excel renders each of those files DIFFERENTLY, depending on the specification that you see at the top of each file.&lt;BR /&gt;
&lt;BR /&gt;
  So, let's remove your style template from the equation, right now. In the long run, your style template will NOT do what you want to do. Let's look at this code sample:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ods tagsets.MSOffice2K file='mso.html' style=sasweb;&lt;BR /&gt;
ods html3 file='ht3.html' style=sasweb;&lt;BR /&gt;
ods html file='ht4.html' style=sasweb;&lt;BR /&gt;
             &lt;BR /&gt;
  title1 'test1';&lt;BR /&gt;
  title2 'test2';&lt;BR /&gt;
  proc print data=sashelp.class (obs=3);&lt;BR /&gt;
  run;&lt;BR /&gt;
ods _all_ close;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                               &lt;BR /&gt;
Notice that I have given the files their correct file extension of HTML. Excel will still open the files: you will either have to find the files in Windows Explorer and Right-mouse click and open with Excel, or you will have to launch Excel and navigate to where the 3 files live and then open each of them.&lt;BR /&gt;
                    &lt;BR /&gt;
The fact that DIFFERENT HTML tags get written for each destination is no accident. If you opened each of the above files with Notepad, you would see the following tags at the top of each file:&lt;BR /&gt;
[pre]&lt;BR /&gt;
MSO.HTML (note that MSOFFICE2K is NOT creating HTML 4.01 compliant HTML tags -- the output file has no DOCTYPE at the top of the file and conforms to the Microsoft spec, not the W3C spec for HTML -- this is OK, as long as you KNOW you want to conform to the Microsoft spec.).&lt;BR /&gt;
&amp;lt;html xmlns:v="urn:schemas-microsoft-com:vml"&amp;gt;&lt;BR /&gt;
                    &lt;BR /&gt;
HT3.HTML&lt;BR /&gt;
&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"&amp;gt;&lt;BR /&gt;
                        &lt;BR /&gt;
HT4.HTML&lt;BR /&gt;
&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&amp;gt;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                 &lt;BR /&gt;
ODS -knows- which type of HTML tags should be generated for each destination. For example, it is OK in HTML 3.2 to have embedded font and color information. That is NOT recommended by the W3C for HTML 4 files. If you want HTML 4 to act like HTML3, the easiest thing to do is just use the HTML3 destination.&lt;BR /&gt;
 &lt;BR /&gt;
Let's look further down in each of the files, now, at the ENTIRE HTML that is written for those 2 title statements:&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
MSO.HTML (NOT in a TABLE tag)&lt;BR /&gt;
&amp;lt;h1 class="SystemTitle" style=" text-align: center;"&amp;gt;test1&amp;lt;/h1&amp;gt;&lt;BR /&gt;
&amp;lt;h1 class="SystemTitle2" style=" text-align: center;"&amp;gt;test2&amp;lt;/h1&amp;gt;&lt;BR /&gt;
               &lt;BR /&gt;
                                                    &lt;BR /&gt;
HT3.HTML  (Titles ARE in a TABLE tag)&lt;BR /&gt;
&amp;lt;TABLE  cellspacing=1 cellpadding=1 rules=NONE frame=VOID border=0 width=100% bgcolor="#FFFFFF"&amp;gt;&lt;BR /&gt;
&amp;lt;TR&amp;gt;&lt;BR /&gt;
 &amp;lt;TD ALIGN=CENTER bgcolor="#FFFFFF"&amp;gt;&amp;lt;font  face="Arial, Helvetica, sans-serif" size="4" color="#003399"&amp;gt;&amp;lt;b&amp;gt;test1&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/TD&amp;gt;&lt;BR /&gt;
&amp;lt;/TR&amp;gt;&lt;BR /&gt;
&amp;lt;TR&amp;gt;&lt;BR /&gt;
 &amp;lt;TD ALIGN=CENTER bgcolor="#FFFFFF"&amp;gt;&amp;lt;font  face="Arial, Helvetica, sans-serif" size="4" color="#003399"&amp;gt;&amp;lt;b&amp;gt;test2&amp;lt;/b&amp;gt;&amp;lt;/font&amp;gt;&amp;lt;/TD&amp;gt;&lt;BR /&gt;
&amp;lt;/TR&amp;gt;&lt;BR /&gt;
&amp;lt;/TABLE&amp;gt;&lt;BR /&gt;
                                        &lt;BR /&gt;
                          &lt;BR /&gt;
HT4.HTML (Titles ARE in a TABLE tag)&lt;BR /&gt;
&amp;lt;table class="SysTitleAndFooterContainer" width="100%" cellspacing="1" cellpadding="1" rules="none" frame="void" &lt;BR /&gt;
border="0" summary="Page Layout"&amp;gt;&lt;BR /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td class="c SystemTitle"&amp;gt;test1&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;BR /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td class="c SystemTitle2"&amp;gt;test2&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;BR /&gt;
&amp;lt;/table&amp;gt;&lt;BR /&gt;
                        &lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
You can see that it is NOT just the H1 tag, it is the fact that for HTML3 and HTML4 files, the SAS titles are put inside a TABLE tag. For the MSOFFICE2K file, the SAS titles are put into &amp;lt;H1&amp;gt; tags. I can only assume this is done because it conforms to the Microsoft specification. I don't even KNOW whether Microsoft Excel would correctly render the &amp;lt;H1&amp;gt; tags if you put them inside a TABLE tag.&lt;BR /&gt;
 &lt;BR /&gt;
In order to change the type or kind of markup language that gets written out, you would change the tagset template, not the style template. If you ONLY wanted to change the underlying fonts and colors, then the issue would be to change the style template. If you like the way that the HTML 3 output looks when rendered in Excel, partly that happens because Excel "likes" the HTML3 tags and "likes" the TABLE tag around the SAS titles. &lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Tue, 03 Mar 2009 00:37:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Delete-line-break-after-header-h1-in-SAS9-1-3/m-p/75643#M8588</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2009-03-03T00:37:02Z</dc:date>
    </item>
  </channel>
</rss>

