<?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 in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507650#M21928</link>
    <description>&lt;P&gt;Depending on the SAS version you are using, you should switch to ods excel. You need at least SAS 9.4m3. With ods excel the &lt;FONT face="courier new,courier"&gt;ods text&lt;/FONT&gt; statement can be used to write text to a xlsx-file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   if &amp;amp;nbrobs. = 0 then do;
      call execute('ods text="# There are no rows#";');
   end;
   else do;
      call execute('%report');
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This does not work with tagset.excelxp!&lt;/P&gt;</description>
    <pubDate>Fri, 26 Oct 2018 05:02:41 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2018-10-26T05:02:41Z</dc:date>
    <item>
      <title>ODS tagsets.ExcelXP</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507619#M21926</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm using SAS EG under Unix.&lt;/P&gt;&lt;P&gt;I have to create a report using a sas table. When the table has 0 observations, the program should write a small note and stops.&lt;/P&gt;&lt;P&gt;But if the table contains rows, we should write a report. The program runs without errors if we dont use the ods to send the report.&lt;/P&gt;&lt;P&gt;But, I'm not able to use the&amp;nbsp;ods tagsets.ExcelXP&amp;nbsp; with data _null_.&lt;/P&gt;&lt;P&gt;Here is the program for this sheet&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods tagsets.ExcelXP path=pathunix file="Rapports_Hebdo_&amp;amp;date_execut..xls" style=templat options(embedded_titles='yes');
ods tagsets.ExcelXP options (sheet_name="Rapport_ Hebdo2);
 
data _null_;
  set out.sess_term_&amp;amp;date_execut.;
   nombre=symgetn('&amp;amp;nbrobs')  
  if Nombre = 0 then do  ;
      put "#  there is no rows#";
  STOP; END;
  else do;
    call execute('%report'); /a macro that executes a proc sql to select columns*/
  end;
run;
ods tagsets.ExcelXP close;
ods listing;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Can anyone provide me with a solution. it's a bit urgent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nihal&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 00:03:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507619#M21926</guid>
      <dc:creator>Nihal</dc:creator>
      <dc:date>2018-10-26T00:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets.ExcelXP</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507625#M21927</link>
      <description>A PUT statement will not write to an ODS destination such as HTML, PDF or TAGSETS. However, there is PROC ODSTEXT if you're using a newer version that will likely do what you need.</description>
      <pubDate>Fri, 26 Oct 2018 01:17:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507625#M21927</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-26T01:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets.ExcelXP</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507650#M21928</link>
      <description>&lt;P&gt;Depending on the SAS version you are using, you should switch to ods excel. You need at least SAS 9.4m3. With ods excel the &lt;FONT face="courier new,courier"&gt;ods text&lt;/FONT&gt; statement can be used to write text to a xlsx-file:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   if &amp;amp;nbrobs. = 0 then do;
      call execute('ods text="# There are no rows#";');
   end;
   else do;
      call execute('%report');
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This does not work with tagset.excelxp!&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 05:02:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507650#M21928</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-10-26T05:02:41Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets.ExcelXP</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507759#M21929</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your answers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to use ods excel I got the message below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: Unable to load module 'SpreadsheetML' from template store!
ERROR: No body file. EXCEL output will not be created.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;For ODSTXT I don't know how to use it. As I said in my first message I should send an excel report that contains multiple sheet.&lt;/P&gt;&lt;P&gt;Can&amp;nbsp;someone give me an&amp;nbsp; example&amp;nbsp;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 14:33:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507759#M21929</guid>
      <dc:creator>Nihal</dc:creator>
      <dc:date>2018-10-26T14:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets.ExcelXP</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507761#M21930</link>
      <description>&lt;P&gt;Sorry I't about "&lt;SPAN&gt;PROC ODSTEXT".&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 14:35:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507761#M21930</guid>
      <dc:creator>Nihal</dc:creator>
      <dc:date>2018-10-26T14:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets.ExcelXP</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507762#M21931</link>
      <description>Lets start with, what version of SAS are you using? You can check using PROC PRODUCT_STATUS; RUN;&lt;BR /&gt;&lt;BR /&gt;PROC ODSTEXT and ODS EXCEL are relatively new (9.4 TS1m3+)&lt;BR /&gt;&lt;BR /&gt;Also, please clarify your question in detail. Your initial question is about sending an email and ods and in the last message you said something new about multi sheet excel. If you can, mock up what you have using a dataset from sashelp so we can run/test things.</description>
      <pubDate>Fri, 26 Oct 2018 14:41:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507762#M21931</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-26T14:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets.ExcelXP</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507772#M21932</link>
      <description>&lt;P&gt;Custom version information: 9.3_M2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The question is that i have to create a excel report then send it by email . I'm working in SAS EG /unix.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The report contains 7 sheets. I've completed 6 sheets but having problem with the last&amp;nbsp;sheet&amp;nbsp;which consists in executing frequencies (%macro rapport).&lt;/P&gt;&lt;P&gt;But if the data in the "set statement" doesn't contains rows, I've tu add note with %put.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Oct 2018 15:00:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507772#M21932</guid>
      <dc:creator>Nihal</dc:creator>
      <dc:date>2018-10-26T15:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: ODS tagsets.ExcelXP</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507790#M21933</link>
      <description>&lt;P&gt;Try something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=p011imau3tm4jen1us2a45cyenz9.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?docsetId=mcrolref&amp;amp;docsetTarget=p011imau3tm4jen1us2a45cyenz9.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It gets you fairly close but I'll leave the modifications up to you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

%macro drive(dsn);
%let dsid=%sysfunc(open(&amp;amp;dsn));
    
 %if &amp;amp;dsid ne 0 %then %do;
  %let cnt=%sysfunc(attrn(&amp;amp;dsid,nlobs));
  %let rc=%sysfunc(close(&amp;amp;dsid));
   %if &amp;amp;cnt ne 0 %then %do;
    proc print data=&amp;amp;dsn;
     title "This is data from data set &amp;amp;dsn"; 
    run;
   %end;
 %end;
 %else %do;
     data missing;
     Error_Message = "Data set &amp;amp;dsn is empty.";
    run;
    
    title;
    proc print data=missing label;
    label error_message = '';
    run;
    

    proc sql noprint;
         drop table missing;
    quit;
    
    %end;;
   
%mend drive;

%drive(sashelp.class);
%drive(demo);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Oct 2018 15:43:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-tagsets-ExcelXP/m-p/507790#M21933</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-10-26T15:43:57Z</dc:date>
    </item>
  </channel>
</rss>

