<?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: Problem: ods html and proc export in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Problem-ods-html-and-proc-export/m-p/127148#M34828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have just noticed that in the error statement SAS writes the path to the directory twice even though I've only written it once in my program. I guess that might be a part of the problem, but how do I handle that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's of any importance, I use Windows 7, 64 bit and SAS 9.2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 27 May 2012 13:57:31 GMT</pubDate>
    <dc:creator>MariaJuul</dc:creator>
    <dc:date>2012-05-27T13:57:31Z</dc:date>
    <item>
      <title>Problem: ods html and proc export</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-ods-html-and-proc-export/m-p/127147#M34827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Forum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a huge problem: I can't get my SAS-files into Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried the following code (with "file" as well as "body" in the statement)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;ODS &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;html&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;FILE&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;"C:\Users\Ejer\Documents\Polit\4. semester\Økonometri B\Øvelser\Uge 18\Test\Uge 18\tabel 1 NY2.xls"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;proc &lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;print&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=tabel_1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;format _numeric_ &lt;/SPAN&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt;commax10.2&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;html&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;close&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;But get the following error: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;942&amp;nbsp; ods html FILE= "C:\Users\Ejer\Documents\Polit\4. semester\Økonometri B\Øvelser\Uge 18\Test\Uge 18\tabel 1 NY2.xls";&lt;/P&gt;&lt;P&gt;NOTE: Writing HTML Body file: C:\Users\Ejer\Documents\Polit\4. semester\Økonometri B\Øvelser\Uge 18\Test\Uge 18\tabel 1 NY2.xls&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR: A component of C:\Users\Ejer\Dropbox\UNI (1)\Fælles\Eksamen økonometri\SAS\Tabeller og&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; figurer\C:\Users\Ejer\Documents\Polit\4. semester\Økonometri B\Øvelser\Uge 18\Test\Uge 18\tabel 1 NY2.xls is not&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a directory.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;WARNING: No body file. HTML output will not be created.&lt;/P&gt;&lt;P&gt;943&amp;nbsp; proc print data=tabel_1;&lt;/P&gt;&lt;P&gt;944&amp;nbsp; format _numeric_ commax10.2;&lt;/P&gt;&lt;P&gt;945&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;NOTE: There were 15 observations read from the data set WORK.TABEL_1.&lt;/P&gt;&lt;P&gt;NOTE: PROCEDURE PRINT used (Total process time):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; real time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cpu time&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.01 seconds&lt;/P&gt;&lt;P&gt;　&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;946&lt;/P&gt;&lt;P&gt;947&amp;nbsp; ods html close;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Furthermore I have tried to use PROC EXPORT, but it won't work either:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;proc &lt;/SPAN&gt;&lt;STRONG style=": ; color: #000080; font-size: 10pt; font-family: Courier New;"&gt;export&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=tabel_1_VARIABLE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;outfile=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'C:\Users\Ejer\Documents\Polit\4. semester\Økonometri B\Øvelser\Uge 18\Tabel 1.xls'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;DBMS&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;=xls &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: Courier New;"&gt;replace&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sheet=&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'Variable'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;The file is created in, but when I try to open it a box tells me that "it can't read the file" and therefore there's no table in it, when I open it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;I really hope you are able to help me!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;Thank you in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 May 2012 13:15:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-ods-html-and-proc-export/m-p/127147#M34827</guid>
      <dc:creator>MariaJuul</dc:creator>
      <dc:date>2012-05-27T13:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem: ods html and proc export</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-ods-html-and-proc-export/m-p/127148#M34828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have just noticed that in the error statement SAS writes the path to the directory twice even though I've only written it once in my program. I guess that might be a part of the problem, but how do I handle that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's of any importance, I use Windows 7, 64 bit and SAS 9.2&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 May 2012 13:57:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-ods-html-and-proc-export/m-p/127148#M34828</guid>
      <dc:creator>MariaJuul</dc:creator>
      <dc:date>2012-05-27T13:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Problem: ods html and proc export</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Problem-ods-html-and-proc-export/m-p/127149#M34829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; The issue is not FILE= vs BODY= -- they are aliases for each other and are not the problem. It seems to me that you are experiencing this problem:&lt;BR /&gt; &lt;A class="active_link" href="http://support.sas.com/kb/15/046.html" title="http://support.sas.com/kb/15/046.html"&gt;http://support.sas.com/kb/15/046.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;where your default location for HTML output has been modified to your C:\users directory and so that information is now "prepended" to your FILE= path. This results in the error message that you see and in the full PATH appearing twice in your LOG. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have 2 choices for a solution:&lt;/P&gt;&lt;P&gt;1) (probably the simplest) use ONLY the file name in the FILE= option:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;ods html file='myfile.html';&lt;/STRONG&gt; or &lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;STRONG&gt;ods html file='myfile.xls'; &lt;/STRONG&gt;&lt;/SPAN&gt; and let the Registry setting provide the path location&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;2) use the PATH= option to explicitly override only the directory path that is coming from the SAS registry (note that the directory you specify must exist):&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2c2cfb;"&gt;&lt;STRONG style="color: #000000; font-family: 'courier new', courier;"&gt;ods html path='c:\temp' (url=none)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #951890;"&gt;&lt;STRONG style="color: #000000; font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; file='test_to_excel.xls' style=sasweb;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px;"&gt;&lt;STRONG style="color: #000000; font-family: 'courier new', courier;"&gt;proc print data=sashelp.class;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #151490;"&gt;&lt;STRONG style="color: #000000; font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2c2cfb;"&gt;&lt;STRONG style="color: #000000; font-family: 'courier new', courier;"&gt;ods _all_ close;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2c2cfb;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2c2cfb;"&gt;&lt;SPAN style="color: #000000;"&gt;So, either way, one of those options should work. If you continue to have issues, you might want to work with Tech Support.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2c2cfb;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2c2cfb;"&gt;&lt;SPAN style="color: #000000;"&gt;FYI -- PROC EXPORT and ODS create very different types of files for Excel to open. PROC EXPORT creates a true, binary Excel proprietary format file. On the other hand, ODS HTML (or any of the HTML destinations) creates an ASCII text file in HTML format which Excel knows how to open. You are merely "fooling" the Windows registry into launching Excel when you give the HTML file a .XLS extension. Also, ODS HTML creates HTML 4.0 compliant tags. Microsoft Excel is not as "happy" to open these type of HTML tags as it is with other types of HTML, either of these 2 destinations creates HTML output that Microsoft is generally "happier" to open: ODS HTML3 (produces HTML 3.2 tags) or ODS MSOFFICE2K (produces Microsoft "flavor" of HTML)&amp;nbsp; Also, if you do NOT care about colors and fonts that come from the style template, you can also use ODS CSV to create a comma separated file for Excel.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2c2cfb;"&gt;&lt;SPAN style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0.0px 0.0px 0.0px 0.0px; color: #2c2cfb;"&gt;&lt;SPAN style="color: #000000;"&gt;cynthia&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 27 May 2012 14:50:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Problem-ods-html-and-proc-export/m-p/127149#M34829</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-05-27T14:50:06Z</dc:date>
    </item>
  </channel>
</rss>

