<?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 exporting log to ods excel destination in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/exporting-log-to-ods-excel-destination/m-p/640565#M19758</link>
    <description>&lt;P&gt;Is there a way to export the log at the end of a program run in the ods excel destination file?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can export using proc printto and then reimport but it is&amp;nbsp; simply onerous and would miss the last part of the program-&lt;/P&gt;
&lt;PRE&gt;ods excel file="//sam1/sss/test.xlsx"  style=Seaside options(sheet_name="Lab Statistics" SHEET_INTERVAL=  'NONE' autofilter='NONE'  FROZEN_ROWHEADERS='no' 
GRIDLINES='ON'  embedded_titles='yes' embedded_footnotes='yes');
ods escapechar="\";
proc report data=graphs headline headskip nowd spanrows style(report)={font_size=8pt cellpadding=1pt cellspacing=1pt}
style(column) = {font = ("arial",8pt) just=center} style(header) = {font = ("arial",9pt) just=center};;
columns dt negative_tests positive ct pos_rate;
define dt /"Date Ending" group;
define negative_tests/"Negative/Tests";
define positive/"Positive/Tests";
define ct/"Total/Tests";
define pos_rate/"Positivity/Rate" format=percent10.;
run;
ods excel close;&lt;/PRE&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lawrence&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Apr 2020 21:09:16 GMT</pubDate>
    <dc:creator>LB</dc:creator>
    <dc:date>2020-04-16T21:09:16Z</dc:date>
    <item>
      <title>exporting log to ods excel destination</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/exporting-log-to-ods-excel-destination/m-p/640565#M19758</link>
      <description>&lt;P&gt;Is there a way to export the log at the end of a program run in the ods excel destination file?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can export using proc printto and then reimport but it is&amp;nbsp; simply onerous and would miss the last part of the program-&lt;/P&gt;
&lt;PRE&gt;ods excel file="//sam1/sss/test.xlsx"  style=Seaside options(sheet_name="Lab Statistics" SHEET_INTERVAL=  'NONE' autofilter='NONE'  FROZEN_ROWHEADERS='no' 
GRIDLINES='ON'  embedded_titles='yes' embedded_footnotes='yes');
ods escapechar="\";
proc report data=graphs headline headskip nowd spanrows style(report)={font_size=8pt cellpadding=1pt cellspacing=1pt}
style(column) = {font = ("arial",8pt) just=center} style(header) = {font = ("arial",9pt) just=center};;
columns dt negative_tests positive ct pos_rate;
define dt /"Date Ending" group;
define negative_tests/"Negative/Tests";
define positive/"Positive/Tests";
define ct/"Total/Tests";
define pos_rate/"Positivity/Rate" format=percent10.;
run;
ods excel close;&lt;/PRE&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lawrence&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 21:09:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/exporting-log-to-ods-excel-destination/m-p/640565#M19758</guid>
      <dc:creator>LB</dc:creator>
      <dc:date>2020-04-16T21:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: exporting log to ods excel destination</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/exporting-log-to-ods-excel-destination/m-p/640629#M19759</link>
      <description>&lt;P&gt;Use proc printto to reroute the log. After ending the reroute with a second proc printto, read the log into a dataset and use proc print and some ods options to create an extra sheet in your workbook:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename mylog temp;

proc printto log=mylog;
run;

ods excel
  file="/folders/myfolders/test.xlsx"
  style=Seaside
  options(
    sheet_name="Lab Statistics"
    SHEET_INTERVAL='NONE'
    autofilter='NONE'
    FROZEN_ROWHEADERS='no' 
    GRIDLINES='ON'
    embedded_titles='yes'
    embedded_footnotes='yes'
  )
;

proc print data=sashelp.class;
run;

proc printto;
run;

data log;
infile mylog truncover;
input logline $80.;
;
run;

ods excel options(sheet_name='Log' sheet_interval='now');

proc print data=log noobs;
run;

ods excel close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The contents of the log are determined by the placement of the proc printto steps; the second proc printto must come before you read the log (otherwise, the file may be locked).&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 07:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/exporting-log-to-ods-excel-destination/m-p/640629#M19759</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-04-17T07:43:49Z</dc:date>
    </item>
  </channel>
</rss>

