<?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: ods tagsets.ExcelXP  to export one table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ods-tagsets-ExcelXP-to-export-one-table/m-p/607555#M176650</link>
    <description>&lt;P&gt;Which client is used? Enterprise Guide? SAS Studio? In Enterprise Guide, you can deactivate the default output of programs via their properties. Or try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods &amp;lt;destination_name&amp;gt; exclude  all;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;before you proc print. And afterwards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods &amp;lt;destination_name&amp;gt; exclude none;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The destination name depends on the client you are using. You can query sashelp.vdest to get the names of the open destinations:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=sashelp.vdest;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could also create a dynamic exclude by querying the view and creating exclude statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Nov 2019 06:41:14 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2019-11-27T06:41:14Z</dc:date>
    <item>
      <title>ods tagsets.ExcelXP  to export one table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-tagsets-ExcelXP-to-export-one-table/m-p/607549#M176648</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I am using ods tagsets.ExcelXP&amp;nbsp; &amp;nbsp;to export one table to one XLS file.&lt;/P&gt;
&lt;P&gt;I see that after I run it there is print&amp;nbsp; on my screen in "Results-SAS Report" window.&lt;/P&gt;
&lt;P&gt;How can I prevent the print?&lt;/P&gt;
&lt;P&gt;The reason is that if the table is very big then it might cause problem to print on screen such a big table.&lt;/P&gt;
&lt;P&gt;I only want to export it without print it.&lt;/P&gt;
&lt;P&gt;I know that proc export just export it without print it but I also want to know how to do it via&amp;nbsp;&lt;CODE class=" language-sas"&gt;ods tagsets.ExcelXP.&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro ExportOneTbl(ds,path,FileName);
ods listing close;
ods tagsets.ExcelXP  
file= "&amp;amp;FileName"  
path= &amp;amp;path;
proc print data=&amp;amp;ds  noobs; 
run; ods tagsets.ExcelXP close; 
ods listing;
%mend ExportOneTbl;


%ExportOneTbl(ds=sashelp.cars,                     
              path="/My path/",
              FileName=cars1.xls);

/*Ask:How to prevent print on screen*/
/*Ask:How to control sheet name?*/
/*Ask:Here we export to xls file. Can we also export to csv/xlsx/xml files*/
/*Is it better to use proc export or  ods tagsets.ExcelXP ? */
/*Can we control formats  with ods tagsets.ExcelXP ?*/&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2019 06:19:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-tagsets-ExcelXP-to-export-one-table/m-p/607549#M176648</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-11-27T06:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: ods tagsets.ExcelXP  to export one table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-tagsets-ExcelXP-to-export-one-table/m-p/607555#M176650</link>
      <description>&lt;P&gt;Which client is used? Enterprise Guide? SAS Studio? In Enterprise Guide, you can deactivate the default output of programs via their properties. Or try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods &amp;lt;destination_name&amp;gt; exclude  all;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;before you proc print. And afterwards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods &amp;lt;destination_name&amp;gt; exclude none;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The destination name depends on the client you are using. You can query sashelp.vdest to get the names of the open destinations:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=sashelp.vdest;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You could also create a dynamic exclude by querying the view and creating exclude statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 06:41:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-tagsets-ExcelXP-to-export-one-table/m-p/607555#M176650</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-11-27T06:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: ods tagsets.ExcelXP  to export one table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-tagsets-ExcelXP-to-export-one-table/m-p/607556#M176651</link>
      <description>&lt;P&gt;Use ODS _ALL_ CLOSE instead of ODS LISTING CLOSE: &lt;A href="https://documentation.sas.com/?docsetId=odsug&amp;amp;docsetTarget=n1sqlptpa8rdtsn1g45nrh7yoff6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=odsug&amp;amp;docsetTarget=n1sqlptpa8rdtsn1g45nrh7yoff6.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Nov 2019 06:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-tagsets-ExcelXP-to-export-one-table/m-p/607556#M176651</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-11-27T06:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: ods tagsets.ExcelXP  to export one table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ods-tagsets-ExcelXP-to-export-one-table/m-p/607557#M176652</link>
      <description>&lt;P&gt;Great .&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close worked well.&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;There is still window called "Results-SAS report" but the print includes no data.&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro ExportOneTbl(ds,path,FileName);
ods _all_ close;/*To prevent print on screen*/
ods listing close;
ods tagsets.ExcelXP  
file= "&amp;amp;FileName"  
path= &amp;amp;path;
proc print data=&amp;amp;ds  noobs; 
run; 
ods tagsets.ExcelXP close; 
ods listing;
%mend ExportOneTbl;
%ExportOneTbl(ds=sashelp.cars,
              path="/my path/",
              FileName=cars1.xls);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Nov 2019 06:45:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ods-tagsets-ExcelXP-to-export-one-table/m-p/607557#M176652</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-11-27T06:45:01Z</dc:date>
    </item>
  </channel>
</rss>

