<?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: How to export the results of PROC LOGISTIC to excel file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420704#M67904</link>
    <description>&lt;P&gt;Please explain what "not working" means. And: post code using either {i} or running-man icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There seems to be an error in the specification of the file that ods should generate.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2017 09:26:34 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2017-12-13T09:26:34Z</dc:date>
    <item>
      <title>How to export the results of PROC LOGISTIC to excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420697#M67902</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using PROC LOGISTIC on multiple datasets , for this I am using macro.&amp;nbsp;Is there a way so I can export the results to excel sheet for each dataset.&lt;/P&gt;&lt;P&gt;I tried using ODS TAGSETS.Excelxp, but not working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro build(in_ds);&lt;/P&gt;&lt;P&gt;ods graphics on;&lt;/P&gt;&lt;P&gt;proc logistic data=&amp;amp;in_ds. ALPHA=&lt;STRONG&gt;0.05&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;outmodel=DS_MDL;&lt;/P&gt;&lt;P&gt;class var1 var2 var3;&lt;/P&gt;&lt;P&gt;model y=x / options;&lt;/P&gt;&lt;P&gt;score data=&amp;amp;in_ds. out=ds_scr;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;ods graphics off;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ODS TAGSETS.EXCELXP&lt;BR /&gt;file='D:worksas9regression.xls'&lt;BR /&gt;STYLE=minimal&lt;BR /&gt;OPTIONS ( Orientation = 'landscape'&lt;BR /&gt;FitToPage = 'yes'&lt;BR /&gt;Pages_FitWidth = '1'&lt;BR /&gt;Pages_FitHeight = '100' );&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%build(dataset1);&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%build(dataset2);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;%build(dataset3);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ODS TAGSETS.EXCELXP close;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create separate reports for 3 datasets, the report name can be passed as a parameter to macro.&lt;/P&gt;&lt;P&gt;Please suggest.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 08:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420697#M67902</guid>
      <dc:creator>UshaLatha</dc:creator>
      <dc:date>2017-12-13T08:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to export the results of PROC LOGISTIC to excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420703#M67903</link>
      <description>&lt;P&gt;Use the dark and forgotten art of by group processing.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods tagsets.excelxp file='d:/worksas9regression.xml' style=minimal options(orientation='landscape' fittopage='yes' pages_fitwidth='1' pages_fitheight='100');

data have;
  length ds_name $20;
  set dataset1 dataset2 dataset3 indsname=tmp;
  ds_name=tmp;
run;

ods graphics on;

proc logistic data=have alpha=0.05 outtmodel=ds_mdl;
  by ds_name;
  class var1 var2 var3;
  model y=x / options;
  score data=have;
run;

ods graphics off;&lt;BR /&gt;&lt;BR /&gt;ods tagsets.excelxp close;&lt;/PRE&gt;
&lt;P&gt;Do note I have corrected the various typos, the random casing, lack of indents etc.&amp;nbsp; I also called the filename xml which is what you are actually creating here by use of a tagset.&amp;nbsp; Also note in the tagset options you may need to set sheet_inteval='bygroup'.&amp;nbsp; As I have nothing to test this on it isn't tested.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 09:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420703#M67903</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-12-13T09:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to export the results of PROC LOGISTIC to excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420704#M67904</link>
      <description>&lt;P&gt;Please explain what "not working" means. And: post code using either {i} or running-man icon.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There seems to be an error in the specification of the file that ods should generate.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 09:26:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420704#M67904</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2017-12-13T09:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to export the results of PROC LOGISTIC to excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420734#M67906</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro build_model(in_dset);
     ods graphics on;
     proc logistic data=&amp;amp;in_dset. ALPHA=0.05  /*&amp;amp;model_plots.*/ outmodel=ds_MDL;
     class &amp;amp;list_class_vars.;
     model DEFAULT_FLAG(EVENT='1')=&amp;amp;list_loan_vars. &amp;amp;selected_macroeconomic_vars.  / &amp;amp;model_opts.;
     score data=&amp;amp;in_dset. out=ds_SCR;
     run;
     ods graphics off;
%mend build_model;



%let plot_path = /home/../../../reports;
ods tagsets.ExcelXP file="&amp;amp;plot_path./report.xml" style=minimal options(orientation='landscape' FittoPage = 'yes' Pages_FitWidth ='1' Pages_FitHeight = '100');
%build_model(dataset1);
ods tagsets.ExcelXP close;


error message:
NOTE: Convergence criterion (GCONV=1E-8) satisfied in Step 17.
NOTE: Convergence criterion (GCONV=1E-8) satisfied in Step 18.
NOTE: Convergence criterion (GCONV=1E-8) satisfied in Step 19.
NOTE: Convergence criterion (GCONV=1E-8) satisfied in Step 20.
WARNING: GPATH or PATH is not a writable directory. It will be ignored.
ERROR: Cannot write image to . Please ensure that proper disk permissions are set.
ERROR: Cannot write image to . Please ensure that proper disk permissions are set.
NOTE: The SAS System stopped processing this step because of errors.

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Please find my code and error messages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 10:50:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420734#M67906</guid>
      <dc:creator>UshaLatha</dc:creator>
      <dc:date>2017-12-13T10:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to export the results of PROC LOGISTIC to excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420736#M67907</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;The datasets here are all having different set of columns.&lt;/P&gt;&lt;P&gt;Is there any way to avoid data-set statement part..&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 10:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420736#M67907</guid>
      <dc:creator>UshaLatha</dc:creator>
      <dc:date>2017-12-13T10:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to export the results of PROC LOGISTIC to excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420740#M67909</link>
      <description>&lt;P&gt;Pleas post some test data, and code which accurately reflect what you have, we can only go on what you post here.&amp;nbsp; Your error is to do with gpath:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_odsgraph_sect032.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_odsgraph_sect032.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the datasets are different and the variables are different, how are you aiming to get the different variables into the macro code?&amp;nbsp; If the same variables are being used in the model each time, just keep them in the dataset.&amp;nbsp; If they are different variables then show how this will go into the macro.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 11:15:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420740#M67909</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-12-13T11:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to export the results of PROC LOGISTIC to excel file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420982#M67938</link>
      <description>&lt;P&gt;I don't believe the XML files that tagsets.excelxp generates can contain graphics. Either make sure that there are no graphics generated or use a different destination such as ODS RTF or ODS PDF.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 20:43:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-export-the-results-of-PROC-LOGISTIC-to-excel-file/m-p/420982#M67938</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-13T20:43:53Z</dc:date>
    </item>
  </channel>
</rss>

