<?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 excel in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/export-to-excel/m-p/234857#M1755</link>
    <description>&lt;P&gt;Well, there was a typo in my program, but this shouldn't affect the output. &amp;nbsp;Can you try just using this:&lt;/P&gt;
&lt;PRE&gt;ods tagsets.excelxp file="c:\temp\example.xml";
proc report data=sashelp.cars nowd;
columns _all_;
run;
ods tagsets.excelxp close;&lt;/PRE&gt;
&lt;P&gt;Should create a file which can then be opened in Excel. &amp;nbsp;Also, check your log to see if the dataset was created, and if there are any other warnings/errors.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Nov 2015 13:08:56 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2015-11-16T13:08:56Z</dc:date>
    <item>
      <title>export to excel</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/export-to-excel/m-p/234847#M1752</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am new in SAS, I executed one proc sql in SAS editor. below is the query&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname db&amp;nbsp;oracle user=GDC password=GDC123 path=prod schema=SALES;&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt; select sales_status,payment_status,datepart(last_order_dt) format=ddmmyy10.,individual_id, (date()-10) format=ddmmyy10.&lt;BR /&gt; from db.print_profile where individual_id=1045582 and datepart(last_order_dt)='18-dec-2014'd ;&lt;BR /&gt;quit;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;using above statement I am getting 80 rows in SAS editor output window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone please suggest me how to export this output in Excel from SAS editor output window.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 10:28:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/export-to-excel/m-p/234847#M1752</guid>
      <dc:creator>CG1</dc:creator>
      <dc:date>2015-11-16T10:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: export to excel</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/export-to-excel/m-p/234850#M1753</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are a number of methods to get data from SAS into Excel. &amp;nbsp;I would recommend creating a dataset from your SQL first however.&lt;/P&gt;
&lt;PRE&gt;libname db oracle user=GDC password=GDC123 path=prod schema=SALES;
proc sql;
  create table WORK.RESULTS as
  select  SALES_STATUS
          ,PAYMENT_STATUS
          ,datepart(LAST_ORDER_DT) format=ddmmyy10.
          ,INDIVIDUAL_ID, 
          (date()-10) format=ddmmyy10.
  from    DB.PRINT_PROFILE 
  where   INDIVIDUAL_ID=1045582 
    and   datepart(LAST_ORDER_DT)='18-dec-2014'd ;
quit; 

ods tagsets.excelxp file="c:\example1.xml";
proc report data=work.results nownd; 
  columns _all_;
run;
ods tagsets.excelxp close;

proc export data=work.results outfile="c:\example2.xlsx";
run;&lt;/PRE&gt;
&lt;P&gt;The above shows 2 examples of how to get data out. &amp;nbsp;The second I tend to avoid using however, proc import/export are guessing procedures, so you may not get what you expect. &amp;nbsp;With the tagsets, its not actually creating an Excel file, but XML which Excel can interpret. &amp;nbsp;This option allows you to specify formatting, styles, Excel options etc. and so is far more flexible than proc export. &amp;nbsp;If you have SAS 9.4, there is also the libname excel option (search for it if needed), which creates a libname directly to an Excel file. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do remember however that Excel has a lot of "features" which may mess around with your data. &amp;nbsp;I would never recommend using that application for any purpose, however in some cases we are forced to use it.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 10:58:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/export-to-excel/m-p/234850#M1753</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-11-16T10:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: export to excel</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/export-to-excel/m-p/234852#M1754</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for replying. I used your first method creating tagsets.excelxp. after my proc sql I execute below statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods tagsets.excelxp file="L:\TST\example2.xml";&lt;BR /&gt;proc report data=work.results nownd; &lt;BR /&gt; columns _all_;&lt;BR /&gt;run;&lt;BR /&gt;ods tagsets.excelxp close;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It creates the excel file in L drive but when I open &amp;nbsp;it says "Unable to read file".&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 12:07:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/export-to-excel/m-p/234852#M1754</guid>
      <dc:creator>CG1</dc:creator>
      <dc:date>2015-11-16T12:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: export to excel</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/export-to-excel/m-p/234857#M1755</link>
      <description>&lt;P&gt;Well, there was a typo in my program, but this shouldn't affect the output. &amp;nbsp;Can you try just using this:&lt;/P&gt;
&lt;PRE&gt;ods tagsets.excelxp file="c:\temp\example.xml";
proc report data=sashelp.cars nowd;
columns _all_;
run;
ods tagsets.excelxp close;&lt;/PRE&gt;
&lt;P&gt;Should create a file which can then be opened in Excel. &amp;nbsp;Also, check your log to see if the dataset was created, and if there are any other warnings/errors.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 13:08:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/export-to-excel/m-p/234857#M1755</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-11-16T13:08:56Z</dc:date>
    </item>
    <item>
      <title>Re: export to excel</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/export-to-excel/m-p/234861#M1756</link>
      <description>&lt;P&gt;You may want to check that you have the most updated version of the ExcelXP tagset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/rnd/base/ods/odsmarkup/index.html" target="_blank"&gt;http://support.sas.com/rnd/base/ods/odsmarkup/index.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 14:00:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/export-to-excel/m-p/234861#M1756</guid>
      <dc:creator>slangan</dc:creator>
      <dc:date>2015-11-16T14:00:03Z</dc:date>
    </item>
  </channel>
</rss>

