<?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: Writing Excel File to Server without Displaying in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555996#M9745</link>
    <description>&lt;P&gt;Is SAS running on the same machine as where you are running Excel?&lt;/P&gt;
&lt;P&gt;If not then how did you get the file from where SAS wrote it to a location that Excel can read it?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use FTP or so other file transfer protocol it might have thought the file was a text file and attempted to the insert CR characters thinking that it needed to adjust for difference in how Unix and Windows normally write text files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 May 2019 16:03:33 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-05-03T16:03:33Z</dc:date>
    <item>
      <title>Writing Excel File to Server without Displaying</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555956#M9736</link>
      <description>&lt;P&gt;I’m trying to write a tabulate query to Excel without displaying it on the screen because the number of columns is 1000+.&lt;/P&gt;
&lt;P&gt;Similar code to the below worked for me in the past.&amp;nbsp; This code writes an Excel look alike file to a server but when I try to open it the file is corrupt.&amp;nbsp; Please advise.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro temp();&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;RV=%sysfunc(appsrv_header(Content-type,application/vnd.ms-excel));&lt;BR /&gt;%mend;&lt;BR /&gt;%temp;&lt;BR /&gt;%LET _ODSSTYLE=Normal;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ods excel file="server path/matrix.xlsx";&lt;BR /&gt;&lt;BR /&gt;proc tabulate data=matrix;&lt;BR /&gt;class COURSE_REFERENCE_NUMBER instructor_primary_id;&lt;BR /&gt;table COURSE_REFERENCE_NUMBER, instructor_primary_id;&lt;BR /&gt;run;&lt;BR /&gt;ods excel close;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 14:59:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555956#M9736</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2019-05-03T14:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Excel File to Server without Displaying</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555959#M9737</link>
      <description>&lt;P&gt;If you don't want Excel (or which ever spreadsheet might open the file by default) in base SAS you would change the SAS preferences:&lt;/P&gt;
&lt;P&gt;Tools&amp;gt;Options&amp;gt;Preferences, on the RESULTS table uncheck the "View results as they are generated".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately I can't suggest any code that would set that and then unset that behavior as needed. (Yet)&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 15:09:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555959#M9737</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-05-03T15:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Excel File to Server without Displaying</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555968#M9738</link>
      <description>&lt;P&gt;Ballard,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My goal is to only download an Excel file.&amp;nbsp; The display output would take forever to load on a screen.&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 15:14:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555968#M9738</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2019-05-03T15:14:56Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Excel File to Server without Displaying</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555983#M9740</link>
      <description>&lt;P&gt;This makes an excel file but the file is corrupt and I cannot open it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods excel file = "serverpath/Maxtrix.xlsx";&lt;BR /&gt;proc tabulate data=AlliedHealthMatrixBase;&lt;BR /&gt;class COURSE_REFERENCE_NUMBER instructor_primary_id;&lt;BR /&gt;table COURSE_REFERENCE_NUMBER, instructor_primary_id;&lt;BR /&gt;run;&lt;BR /&gt;ods excel close;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 15:38:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555983#M9740</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2019-05-03T15:38:57Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Excel File to Server without Displaying</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555987#M9742</link>
      <description>&lt;P&gt;Make sure that your PROC is actually generating some output.&lt;/P&gt;
&lt;P&gt;Make sure that you have moved the XLSX file to where ever you are trying to open it as a BINARY file so that it is not getting corrupted in transit.&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 15:52:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555987#M9742</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-03T15:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Excel File to Server without Displaying</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555990#M9744</link>
      <description>&lt;P&gt;Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The proc is generating output.&amp;nbsp; What do you mean by binary file?&amp;nbsp; Do i set a setting in SAS?&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 15:55:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555990#M9744</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2019-05-03T15:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Excel File to Server without Displaying</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555996#M9745</link>
      <description>&lt;P&gt;Is SAS running on the same machine as where you are running Excel?&lt;/P&gt;
&lt;P&gt;If not then how did you get the file from where SAS wrote it to a location that Excel can read it?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you use FTP or so other file transfer protocol it might have thought the file was a text file and attempted to the insert CR characters thinking that it needed to adjust for difference in how Unix and Windows normally write text files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 16:03:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555996#M9745</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-03T16:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Excel File to Server without Displaying</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555997#M9746</link>
      <description>&lt;P&gt;What is with the APPSRV_HEADER call?&lt;/P&gt;
&lt;P&gt;Are you running SAS as a stored process or other web based interface?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also what version of SAS are you using?&amp;nbsp; ODS EXCEL was initially introduced as experimental so if you are using an old version of SAS it might still be buggy.&lt;/P&gt;</description>
      <pubDate>Fri, 03 May 2019 16:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/555997#M9746</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-05-03T16:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Excel File to Server without Displaying</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/556017#M9748</link>
      <description>I unfortunately believe ODS EXCEL is still buggy with a lot of columns and that's part of the issue.</description>
      <pubDate>Fri, 03 May 2019 17:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/556017#M9748</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-05-03T17:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Writing Excel File to Server without Displaying</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/556512#M9836</link>
      <description>&lt;P&gt;I ended up spending too much time on this item and moved on.&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 18:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Writing-Excel-File-to-Server-without-Displaying/m-p/556512#M9836</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2019-05-06T18:02:02Z</dc:date>
    </item>
  </channel>
</rss>

