<?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: Export to an &amp;quot;.xls&amp;quot; excel file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146582#M38914</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wutao9999 and davide: If either or both of you are on a Windows' operating system, take a look at the free macro that &lt;A __default_attr="2431" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;,&amp;nbsp; &lt;A __default_attr="733023" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; and I wrote: &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export" title="http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export"&gt;A Poor/Rich SAS Users Proc Export - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has three possible values for the type parameter: N to create a new workbook, A to add a worksheet and M to modify an existing worksheet. It also has a range parameter so that you can write data starting at a particular range without having to predefine the range in Excel.&amp;nbsp; The macro also provides a way to take advantage of Excel templates (see, e.g., &lt;A href="http://www.torsas.ca/attachments/File/09122014/Art_TASS_12Sep2014.pdf" title="http://www.torsas.ca/attachments/File/09122014/Art_TASS_12Sep2014.pdf"&gt;http://www.torsas.ca/attachments/File/09122014/Art_TASS_12Sep2014.pdf&lt;/A&gt; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Sep 2014 16:15:30 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2014-09-16T16:15:30Z</dc:date>
    <item>
      <title>Export to an ".xls" excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146576#M38908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to export a data set to "sheet1" in an excel file, if the data already exists in "sheet1", then replace it.&amp;nbsp; The below SAS code works well if the excel file is a ".xlsx" file.&amp;nbsp; However, I need do the similar work for a ".xls" excel file, can I do such thing for a ".xls" excel file?&amp;nbsp; Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #000080; font-size: 12pt; font-family: Courier New;"&gt;EXPORT&lt;/STRONG&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;DATA&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=data1&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;OUTFILE&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 12pt; font-family: Courier New;"&gt;"c:\test.xlsx"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;DBMS&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=EXCELCS &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;REPLACE&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt; font-family: Courier New;"&gt;SHEET&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 12pt; font-family: Courier New;"&gt;"sheet1"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 14:41:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146576#M38908</guid>
      <dc:creator>wutao9999</dc:creator>
      <dc:date>2014-09-16T14:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Export to an ".xls" excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146577#M38909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://communities.sas.com/thread/61115"&gt;https://communities.sas.com/thread/61115&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 14:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146577#M38909</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2014-09-16T14:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Export to an ".xls" excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146578#M38910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/20/923.html" title="http://support.sas.com/kb/20/923.html"&gt;20923 - How REPLACE option works with PROC EXPORT and Excel files in SAS 9.1&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:03:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146578#M38910</guid>
      <dc:creator>Hima</dc:creator>
      <dc:date>2014-09-16T15:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Export to an ".xls" excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146579#M38911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just an FYI, I tried and working fine for me when used replace option. Here is the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc export data=want&lt;/P&gt;&lt;P&gt;outfile='C:\want.xls'&lt;/P&gt;&lt;P&gt;dbms=excel replace;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:14:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146579#M38911</guid>
      <dc:creator>Hima</dc:creator>
      <dc:date>2014-09-16T15:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: Export to an ".xls" excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146580#M38912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that wutao9999 want to write in a specific sheet of an existing excel file (at lest is what i also need to do),&lt;/P&gt;&lt;P&gt;for what i read from Hima's link seems that SAS when want to write in a specific sheet try to create it , and if the name that we want to use is alredy in used SAS add a numeric character to avoid the duplication...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, this mean that i have no way to export a data set in a specific sheet in a alredy existing excel file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank a lot&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Davide&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just to be sure i add the code that i'm using&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;proc export&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;data = test&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;outfile = "C:\test\fileexcel.xlsx"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;DBMS = EXCEL&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;REPLACE;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;SHEET = "foglio1";&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;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:35:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146580#M38912</guid>
      <dc:creator>davide</dc:creator>
      <dc:date>2014-09-16T15:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: Export to an ".xls" excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146581#M38913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Davide,&lt;/P&gt;&lt;P&gt;There is a hotfix for what you are looking for&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/51/580.html" title="http://support.sas.com/kb/51/580.html"&gt;51580 - The XLSX engine is enhanced to write multiple sheets per Microsoft Excel file in the first maintenance release of SAS® 9.3 (TS1M1)&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 15:45:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146581#M38913</guid>
      <dc:creator>Hima</dc:creator>
      <dc:date>2014-09-16T15:45:51Z</dc:date>
    </item>
    <item>
      <title>Re: Export to an ".xls" excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146582#M38914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;wutao9999 and davide: If either or both of you are on a Windows' operating system, take a look at the free macro that &lt;A __default_attr="2431" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;,&amp;nbsp; &lt;A __default_attr="733023" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; and I wrote: &lt;/P&gt;&lt;P&gt;&lt;A href="http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export" title="http://www.sascommunity.org/wiki/A_Poor/Rich_SAS_Users_Proc_Export"&gt;A Poor/Rich SAS Users Proc Export - sasCommunity&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has three possible values for the type parameter: N to create a new workbook, A to add a worksheet and M to modify an existing worksheet. It also has a range parameter so that you can write data starting at a particular range without having to predefine the range in Excel.&amp;nbsp; The macro also provides a way to take advantage of Excel templates (see, e.g., &lt;A href="http://www.torsas.ca/attachments/File/09122014/Art_TASS_12Sep2014.pdf" title="http://www.torsas.ca/attachments/File/09122014/Art_TASS_12Sep2014.pdf"&gt;http://www.torsas.ca/attachments/File/09122014/Art_TASS_12Sep2014.pdf&lt;/A&gt; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Sep 2014 16:15:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Export-to-an-quot-xls-quot-excel-file/m-p/146582#M38914</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2014-09-16T16:15:30Z</dc:date>
    </item>
  </channel>
</rss>

