<?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: What is causing the error in ODS EXCEL? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599927#M173279</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;M5 is pretty recent so should be fine. I suggest you try moving your code outside of the macro and hard-coding all parameters to exclude that as the reason for your error. If the error still occurs, try simplifying your report until the error disappears, to isolate where it is happening.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Did that. Same problem, so it's not the macro.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not the report either, the reporting code works fine in ODS HTML and ODS RTF.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2019 20:10:31 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-10-28T20:10:31Z</dc:date>
    <item>
      <title>What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599876#M173258</link>
      <description>&lt;P&gt;I have written a macro, and it works fine until the ODS EXCEL command. The macro extracts some data from data bases, based upon macro arguments, does some calculations, and then tries to creates a table via ODS EXCEL. I have removed from this example the stuff that works properly, as there are no errors in the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro monitoring2(startdate1=,enddate1=,startdate2=,enddate2=,
    no_rates_lastXweeks=2,graphics_only=0,debug=0,outxlsx=,acaps=1);
	%put;
	%put &amp;amp;=outxlsx;
	%put;
	ods excel file="&amp;amp;outxlsx" options(sheet_name='Data');
	proc report data=_stats1a_;
		columns method week _freq_ booking_rate approval_rate conversion_rate exception_rate;
		define method/group 'Method' order=data;
		define week/group "Week" format=wff. order=internal;
		define booking_rate/display 'Booking Rate';
		define _freq_/display 'N Apps' format=comma10.0;
		define approval_rate/display 'Approval Rate';
		define conversion_rate/display 'Conversion Rate';
		define exception_rate/display 'Exception Rate';
		compute week;
		    if week=1e10 then call define(_row_,'style','style={color=verydarkblue fontweight=bold background=lightyellow}');
		endcompute;
	run;
	ods excel close;
%mend;

%monitoring2(startdate1=01JUL19,enddate1=31JUL19,
 startdate2=01AUG19,debug=1,graphics_only=1,
 outxlsx=&amp;amp;pers\ias2\testplots3.xlsx,acaps=0)

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, here's the log. Note that the %PUT statement shows that the macro variable &amp;amp;OUTXLSX has the desired value, it hasn't changed (shown in red). The error occurs in the ODS EXCEL command, and not in the PROC REPORT. The file name, which is correct in &amp;amp;OUTXLSX, has C:\Users... etc. prepended to the value of &amp;amp;OUTXLSX, and of course, there is no such folder once the mysterious addition to &amp;amp;OUTXLSX happens. Why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;9503  %monitoring2(startdate1=01JUL19,enddate1=31JUL19,
startdate2=01AUG19,debug=1,graphics_only=1,
outxlsx=&amp;amp;pers\ias2\testplots3.xlsx)

&lt;FONT color="#FF0000"&gt;OUTXLSX=G:\Team12\Credit Risk Oversight\Retail Risk\Users\MillerP\ias2\testplots3.xlsx&lt;/FONT&gt;

MPRINT(MONITORING2):   ods excel file="G:\Team12\Credit Risk Oversight\Retail Risk\Users\MillerP\ias2\testplots3.xlsx" options(sheet_name='Data');
NOTE: Writing EXCEL Body file: G:\Team12\Credit Risk Oversight\Retail Risk\Users\MillerP\ias2\testplots3.xlsx
ERROR: A component of C:\Users\eccrpm0\AppData\Local\Temp\SAS Temporary Files\_TD16364_PCVPTWX6VP00119_\_T00000000069D5120\G:\Team12\Credit Risk
       Oversight\Retail Risk\Users\MillerP\ias2\testplots3.xlsx is not a directory.
ERROR: No body file. EXCEL output will not be created.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just for completeness, the macro variable &amp;amp;pers in the call to the macro resolves as&amp;nbsp;G:\Team12\Credit Risk Oversight\Retail Risk\Users\MillerP, so &amp;amp;OUTXLSX does indeed have the desired folder location.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 17:21:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599876#M173258</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-28T17:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599885#M173260</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;I have written a macro, and it works fine until the ODS EXCEL command. The macro extracts some data from data bases, based upon macro arguments, does some calculations, and then tries to creates a table via ODS EXCEL. I have removed from this example the stuff that works properly, as there are no errors in the log.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro monitoring2(startdate1=,enddate1=,startdate2=,enddate2=,
    no_rates_lastXweeks=2,graphics_only=0,debug=0,outxlsx=,acaps=1);
	%put;
	%put &amp;amp;=outxlsx;
	%put;
	ods excel file="&amp;amp;outxlsx" options(sheet_name='Data');
	proc report data=_stats1a_;
		columns method week _freq_ booking_rate approval_rate conversion_rate exception_rate;
		define method/group 'Method' order=data;
		define week/group "Week" format=wff. order=internal;
		define booking_rate/display 'Booking Rate';
		define _freq_/display 'N Apps' format=comma10.0;
		define approval_rate/display 'Approval Rate';
		define conversion_rate/display 'Conversion Rate';
		define exception_rate/display 'Exception Rate';
		compute week;
		    if week=1e10 then call define(_row_,'style','style={color=verydarkblue fontweight=bold background=lightyellow}');
		endcompute;
	run;
	ods excel close;
%mend;

%monitoring2(startdate1=01JUL19,enddate1=31JUL19,
 startdate2=01AUG19,debug=1,graphics_only=1,
 outxlsx=&amp;amp;pers\ias2\testplots3.xlsx,acaps=0)

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, here's the log. Note that the %PUT statement shows that the macro variable &amp;amp;OUTXLSX has the desired value, it hasn't changed (shown in red). The error occurs in the ODS EXCEL command, and not in the PROC REPORT. The file name, which is correct in &amp;amp;OUTXLSX, has C:\Users... etc. prepended to the value of &amp;amp;OUTXLSX, and of course, there is no such folder once the mysterious addition to &amp;amp;OUTXLSX happens. Why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;9503  %monitoring2(startdate1=01JUL19,enddate1=31JUL19,
startdate2=01AUG19,debug=1,graphics_only=1,
outxlsx=&amp;amp;pers\ias2\testplots3.xlsx)

&lt;FONT color="#FF0000"&gt;OUTXLSX=G:\Team12\Credit Risk Oversight\Retail Risk\Users\MillerP\ias2\testplots3.xlsx&lt;/FONT&gt;

MPRINT(MONITORING2):   ods excel file="G:\Team12\Credit Risk Oversight\Retail Risk\Users\MillerP\ias2\testplots3.xlsx" options(sheet_name='Data');
NOTE: Writing EXCEL Body file: G:\Team12\Credit Risk Oversight\Retail Risk\Users\MillerP\ias2\testplots3.xlsx
ERROR: A component of C:\Users\eccrpm0\AppData\Local\Temp\SAS Temporary Files\_TD16364_PCVPTWX6VP00119_\_T00000000069D5120\G:\Team12\Credit Risk
       Oversight\Retail Risk\Users\MillerP\ias2\testplots3.xlsx is not a directory.
ERROR: No body file. EXCEL output will not be created.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just for completeness, the macro variable &amp;amp;pers in the call to the macro resolves as&amp;nbsp;G:\Team12\Credit Risk Oversight\Retail Risk\Users\MillerP, so &amp;amp;OUTXLSX does indeed have the desired folder location.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Maybe this note is applicable:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/15/046.html" target="_blank" rel="noopener"&gt;http://support.sas.com/kb/15/046.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and this (they seem related):&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/61/280.html" target="_blank" rel="noopener"&gt;http://support.sas.com/kb/61/280.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are using z/OS you might be out of luck:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/kb/62/838.html" target="_blank"&gt;http://support.sas.com/kb/62/838.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 17:44:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599885#M173260</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2019-10-28T17:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599887#M173262</link>
      <description>&lt;P&gt;Yes those are the same errors, except for HTML output. I don't think the solutions given apply to EXCEL output (on Windows 10).&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 17:59:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599887#M173262</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-28T17:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599889#M173264</link>
      <description>&lt;P&gt;Maybe play around with the WORK= options with the ODS EXCEL statement? For example, only specify a filename with&amp;nbsp; FILE= and specify your output directory in the WORK= statement? Trying to trick SAS here.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 18:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599889#M173264</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2019-10-28T18:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599890#M173265</link>
      <description>&lt;P&gt;Have you tried changing your output directory to somewhere more local?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Sometimes" Windows can mess with other programs, whether it is through folder permissions, special characters or simply invalid path names (sometimes we make typos). Given that's where the error seems to be complaining about that's at least where I would start. If you can output it directly to the C:\ (bad practice maybe take it to C:\Users\Folder but still a valid test) then that at least gets you a little closer to narrowing down the root of the issue.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 18:10:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599890#M173265</guid>
      <dc:creator>Krueger</dc:creator>
      <dc:date>2019-10-28T18:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599896#M173268</link>
      <description>&lt;P&gt;The problem exists when I attempt to write the file locally, and when I attempt to write the file to a server.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 18:29:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599896#M173268</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-28T18:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599917#M173275</link>
      <description>&lt;P&gt;What maintenance release of SAS 9.4 are you using? The EXCEL ODS option was a bit buggy in earlier releases.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 19:25:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599917#M173275</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-28T19:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599919#M173276</link>
      <description>&lt;P&gt;SAS 9.4 TS1M5&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 19:29:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599919#M173276</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-28T19:29:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599926#M173278</link>
      <description>&lt;P&gt;M5 is pretty recent so should be fine. I suggest you try moving your code outside of the macro and hard-coding all parameters to exclude that as the reason for your error. If the error still occurs, try simplifying your report until the error disappears, to isolate where it is happening.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 20:07:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599926#M173278</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-10-28T20:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599927#M173279</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;M5 is pretty recent so should be fine. I suggest you try moving your code outside of the macro and hard-coding all parameters to exclude that as the reason for your error. If the error still occurs, try simplifying your report until the error disappears, to isolate where it is happening.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Did that. Same problem, so it's not the macro.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not the report either, the reporting code works fine in ODS HTML and ODS RTF.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 20:10:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599927#M173279</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-28T20:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599928#M173280</link>
      <description>&lt;P&gt;Try specifying the work directory as something other than default&lt;CODE class="  language-sas"&gt;:&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="  language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="  language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="  language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;ods excel file="&amp;amp;outxlsx" work="G:\Team12\Credit Risk Oversight\Retail Risk\Users\MillerP\ias2" options(sheet_name='Data');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods excel file="testplots3.xlsx" work="G:\Team12\Credit Risk Oversight\Retail Risk\Users\MillerP\ias2" options(sheet_name='Data');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 20:13:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599928#M173280</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2019-10-28T20:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599937#M173286</link>
      <description>&lt;P&gt;I am a little confused about how specific is the error.&amp;nbsp; From some of your answers it seems that just using the ODS EXCEL statement is generating the error.&amp;nbsp; That is doesn't matter what report you are writing.&amp;nbsp; Is that true? Do you get the error just trying to write a copy of SASHELP.CLASS using PROC PRINT?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so then does it matter if you try to write to a different directory on the G drive?&amp;nbsp; A different drive letter?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What if you include quotes to protect the spaces in the folder name from Windows/DOS?&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods excel file="""G:\Team12\Credit Risk Oversight\Retail Risk\Users\MillerP\ias2\testplots3.xlsx"""  ...&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;What if you write to a directory that doesn't include spaces in its name?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 21:12:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/599937#M173286</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-10-28T21:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600028#M173334</link>
      <description>&lt;P&gt;Two options:&lt;/P&gt;
&lt;P&gt;1) try proc print or proc tabulate instead of proc report .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2)remove&amp;nbsp; &amp;nbsp;file="&amp;amp;outxlsx"&amp;nbsp; &amp;nbsp;from ods excel , let sas create an temp file under work library .&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 11:51:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600028#M173334</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-10-29T11:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600035#M173340</link>
      <description>&lt;P&gt;The problem with almost all of these suggestions is that I shouldn't have to use PRINT or TABULATE; I shouldn't have to try different folders or folders with no spaces in the folder name. It should (and has in the past) worked properly as I have coded it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am going to see what SAS Tech Support has to say.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 12:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600035#M173340</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-29T12:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600041#M173343</link>
      <description>&lt;P&gt;Paige,&lt;/P&gt;
&lt;P&gt;Is your SAS at server side or your local PC ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;From the LOG ,it imply you are using SAS Server , Are you using SAS/EG or SAS Studio ?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 12:29:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600041#M173343</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-10-29T12:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600044#M173345</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;The problem with almost all of these suggestions is that I shouldn't have to use PRINT or TABULATE; I shouldn't have to try different folders or folders with no spaces in the folder name. It should (and has in the past) worked properly as I have coded it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am going to see what SAS Tech Support has to say.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's all true but if you can get it to work by changing the temp folder or outputting to a different folder then that may help SAS Tech Support figure out what's going on.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 12:31:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600044#M173345</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2019-10-29T12:31:16Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600049#M173350</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/83374"&gt;@DWilson&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The problem with almost all of these suggestions is that I shouldn't have to use PRINT or TABULATE; I shouldn't have to try different folders or folders with no spaces in the folder name. It should (and has in the past) worked properly as I have coded it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am going to see what SAS Tech Support has to say.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;That's all true but if you can get it to work by changing the temp folder or outputting to a different folder then that may help SAS Tech Support figure out what's going on.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes, and I have already stated that I have tried all reasonable debugging methods that I can think of, like different folder on a different drive, removing spaces from the folder name,&amp;nbsp;&lt;EM&gt;etc&lt;/EM&gt;. (none of which should be necessary, and ODS HTML is not showing these problems on the exact same code/data)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Other than the first reply, no one has addressed why the LOG shows ODS EXCEL is trying to write to the wrong folder where the folder name has pre-pended "C:\Users..."&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 12:49:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600049#M173350</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-29T12:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600050#M173351</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/83374"&gt;@DWilson&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;The problem with almost all of these suggestions is that I shouldn't have to use PRINT or TABULATE; I shouldn't have to try different folders or folders with no spaces in the folder name. It should (and has in the past) worked properly as I have coded it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am going to see what SAS Tech Support has to say.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That's all true but if you can get it to work by changing the temp folder or outputting to a different folder then that may help SAS Tech Support figure out what's going on.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes, and I have already stated that I have tried all reasonable debugging methods that I can think of, like different folder on a different drive, removing spaces from the folder name,&amp;nbsp;&lt;EM&gt;etc&lt;/EM&gt;. (none of which should be necessary, and ODS HTML is not showing these problems on the exact same code/data)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other than the first reply, no one has addressed why the LOG shows ODS EXCEL is trying to write to the wrong folder where the folder name has pre-pended "C:\Users..."&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It sounds like a bug. Like the one mentioned in the SAS notes I listed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is the pre-pended "C:\Users.." folder your SAS temp folder?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I may have missed it, but did you try specifying WORK= in your ODS EXCEL statement to tell SAS to use a different temp directory? Did you try specifying only a filename with file= and specifying the work directory as the directory where you want the file to be saved? If so, my apologies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Btw, I'm not suggesting these things as a panacea. I'm suggesting these things to see if you can get SAS to produce the file you want where you want. If you can, then it may help SAS tech support narrow down the issue. Of course, they may already know about this issue and not need any help but, if they don't, I'm sure they'll have lots of the same questions you've seen here from other posters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 13:01:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600050#M173351</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2019-10-29T13:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600062#M173358</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The problem with almost all of these suggestions is that I shouldn't have to use PRINT or TABULATE; I shouldn't have to try different folders or folders with no spaces in the folder name. It should (and has in the past) worked properly as I have coded it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am going to see what SAS Tech Support has to say.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please update the thread with any answers you get.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Most of the suggestions for basic debugging tips you are getting is because you did not present the issue in a way that made it look like you had done anything to test.&amp;nbsp; For example I would normally expect to see a minimal set of code that reproduces the problem. But your code includes both macro code and complex proc report code.&amp;nbsp; So is the issue with the macro code?&amp;nbsp; If you had tested and eliminated the macro code why did you include it in the test?&amp;nbsp; Is the issue with PROC REPORT?&amp;nbsp; If you had tested and eliminated PROC REPORT as the issue then why did you include it in the code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I just ran this little example program on SAS PC version&amp;nbsp;9.4 (TS1M5) (using single byte character encoding):&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;62    ods excel file="c:\downloads\ods.xlsx" options(sheet_name='Data');
63    proc print data=sashelp.class; run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.09 seconds
      cpu time            0.06 seconds


64    ods excel close;
NOTE: Writing EXCEL file: c:\downloads\ods.xlsx
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Without any issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The one thing I did notice is that on PC SAS when the XLSX files was closed SAS automatically tried to open the file using Excel on my PC.&amp;nbsp; &amp;nbsp;That does not sound like the error you are receiving is caused by that process.&amp;nbsp; Unless you had previously been trying to direct ODS EXCEL to a different file and running the new ODS EXCEL statement with a new output file caused it to close the old file and try to open it.&amp;nbsp; If so the error is not with this ODS EXCEL statement but the one before it.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 13:41:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600062#M173358</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-10-29T13:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: What is causing the error in ODS EXCEL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600067#M173359</link>
      <description>&lt;P&gt;I may have found the problem by accident.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although the code originally presented did not have a STYLE= option in the PROC REPORT statement, that seems to be the problem. Even if I remove the STYLE= from the PROC REPORT statement later in the same SAS session, somehow things are still screwed up and I get the error. And so I showed in my first post PROC REPORT with no STYLE= option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, restart SAS, never issue the STYLE= in the PROC REPORT statement and everything works fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add STYLE= into the PROC REPORT statement, nothing works thereafter in that SAS session.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All very repeatable now. I have tested this a few times. Currently, I have restarted SAS and performed the ODS EXCEL/PROC REPORT part of the code without error, probably 20 times in the latest SAS session, and it works as long as I don't use STYLE=.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not sure what is wrong with the STYLE= option that I was using, I think it was developed for ODS HTML and does not work in ODS EXCEL, but that's speculation.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 13:55:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/What-is-causing-the-error-in-ODS-EXCEL/m-p/600067#M173359</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-10-29T13:55:34Z</dc:date>
    </item>
  </channel>
</rss>

