<?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: DDE ERROR: Physical file does not exist when reading from SAS dataset into Excel Template in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DDE-ERROR-Physical-file-does-not-exist-when-reading-from-SAS/m-p/495862#M130977</link>
    <description>&lt;P&gt;Thanks! Your code helped me remember that Excel Sheet name was a thing. Changed it in the code to match excel and it works now. Have a good weekend!&lt;/P&gt;</description>
    <pubDate>Sat, 15 Sep 2018 01:13:42 GMT</pubDate>
    <dc:creator>chiangjx</dc:creator>
    <dc:date>2018-09-15T01:13:42Z</dc:date>
    <item>
      <title>DDE ERROR: Physical file does not exist when reading from SAS dataset into Excel Template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-ERROR-Physical-file-does-not-exist-when-reading-from-SAS/m-p/495858#M130973</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm running into an error with using DDE&amp;nbsp;to read from a SAS dataset into a&amp;nbsp;structured Excel Template. I have run this same type of code with another program with no error. What is strange is when I run the x %bquote section, the template file opens in Excel so I know this part is working (and it does the same thing in the working program), but for some reason when it gets to the write in data step, it doesn't seem to notice the excel file exists. The working program even has a more complex template name and structure but it reads everything fine.&lt;BR /&gt;&lt;BR /&gt;I've tried using direct link instead of the&amp;nbsp;&lt;SPAN&gt;&amp;amp;templateName (writing the whole templatepath\templatename out) section also to no avail. Everything else in the program runs fine except for the DDE into Excel portion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code:&lt;/STRONG&gt;&lt;BR /&gt;%let templatePath=\\server\Project_Library\folder1\folder2;&lt;BR /&gt;%let templateName=Template.xls;&lt;BR /&gt;&lt;BR /&gt;X %bquote("&amp;amp;templatePath\&amp;amp;templateName");&amp;nbsp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;x=sleep(10);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Filename Title DDE "Excel|[&amp;amp;templateName]RPT!r1c3:r1c3";&lt;BR /&gt;Filename Title2 DDE "Excel|[&amp;amp;templateName]RPT!r3c3:r3c5";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data _Null_;&lt;BR /&gt;File Title NoTab;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;Data _Null_;&lt;BR /&gt;File Title2 NoTab;&lt;BR /&gt;Put &amp;amp;date1 "09"x "09"x "09"x;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The Error code from log:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1135&lt;BR /&gt;1136 /* DDE into template */&lt;BR /&gt;1137 X %bquote("&amp;amp;templatePath\&amp;amp;templateName")&lt;BR /&gt;1137! ;&lt;/P&gt;&lt;P&gt;1138&lt;BR /&gt;1139 data _null_;&lt;BR /&gt;1140 x=sleep(10);&lt;BR /&gt;1141 run;&lt;/P&gt;&lt;P&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 10.04 seconds&lt;BR /&gt;cpu time 0.03 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1142&lt;BR /&gt;1143 Filename Title DDE "Excel|[&amp;amp;templateName]RPT!r1c3:r1c3";&lt;BR /&gt;1144 Filename Title2 DDE "Excel|[&amp;amp;templateName]RPT!r3c3:r3c5";&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1178&lt;BR /&gt;1179 /*Populate Title*/&lt;BR /&gt;1180 Data _Null_;&lt;BR /&gt;1181 File Title NoTab;&lt;BR /&gt;1182 /* Put &amp;amp;date "09"x; */&lt;BR /&gt;1183 Run;&lt;/P&gt;&lt;P&gt;ERROR: Physical file does not exist, Excel|[Template.xls]RPT!r1c3:r1c3.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;1184&lt;BR /&gt;1185 Data _Null_;&lt;BR /&gt;1186 File Title2 NoTab;&lt;BR /&gt;1187 Put &amp;amp;date1 "09"x "09"x "09"x;&lt;BR /&gt;1188 Run;&lt;/P&gt;&lt;P&gt;ERROR: Physical file does not exist, Excel|[Template.xls]RPT!r3c3:r3c5.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;At this point I'm at a loss. Am I missing something? Much appreciated for the help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 00:42:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-ERROR-Physical-file-does-not-exist-when-reading-from-SAS/m-p/495858#M130973</guid>
      <dc:creator>chiangjx</dc:creator>
      <dc:date>2018-09-15T00:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: DDE ERROR: Physical file does not exist when reading from SAS dataset into Excel Template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-ERROR-Physical-file-does-not-exist-when-reading-from-SAS/m-p/495859#M130974</link>
      <description>&lt;P&gt;Where are you opening Excel? Your code will only work if you have an Excel session open, either started manually or started in your code. I see you have a DATA step sleeping for 10 seconds. Maybe you missed out starting Excel in that step.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 00:50:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-ERROR-Physical-file-does-not-exist-when-reading-from-SAS/m-p/495859#M130974</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-09-15T00:50:17Z</dc:date>
    </item>
    <item>
      <title>Re: DDE ERROR: Physical file does not exist when reading from SAS dataset into Excel Template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-ERROR-Physical-file-does-not-exist-when-reading-from-SAS/m-p/495860#M130975</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;this code opens excel for me:&lt;BR /&gt;X %bquote("&amp;amp;templatePath\&amp;amp;templateName");&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 00:52:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-ERROR-Physical-file-does-not-exist-when-reading-from-SAS/m-p/495860#M130975</guid>
      <dc:creator>chiangjx</dc:creator>
      <dc:date>2018-09-15T00:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: DDE ERROR: Physical file does not exist when reading from SAS dataset into Excel Template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-ERROR-Physical-file-does-not-exist-when-reading-from-SAS/m-p/495861#M130976</link>
      <description>&lt;P&gt;here is a sample of what I use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;options noxwait noxsync mlogic;&lt;BR /&gt;X "C:\Program Files\Microsoft Office\Office\EXCEL.EXE";&lt;BR /&gt;data _null_;&lt;BR /&gt;x=sleep(5);&lt;BR /&gt;run;&lt;BR /&gt;filename cmds dde 'excel|system';&lt;BR /&gt;data _null_;&lt;BR /&gt;length mystuff $250;&lt;BR /&gt;file cmds;&lt;BR /&gt;pre_book = '[open("'||"&amp;amp;temppath.\&amp;amp;workbook."||'")]';&lt;BR /&gt;put pre_book;&lt;BR /&gt;run;&lt;BR /&gt;filename outpre dde&lt;BR /&gt;"Excel|&amp;amp;temppath.\[&amp;amp;workbook.]&amp;amp;sheet.!r1c1:r561c10" notab;&lt;/P&gt;&lt;P&gt;/* put the information into the cells in the worksheet */&lt;BR /&gt;data _null_;&lt;BR /&gt;file outpre notab;&lt;/P&gt;&lt;P&gt;/* a lot of puts and x'09' */&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 01:02:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-ERROR-Physical-file-does-not-exist-when-reading-from-SAS/m-p/495861#M130976</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-09-15T01:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: DDE ERROR: Physical file does not exist when reading from SAS dataset into Excel Template</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DDE-ERROR-Physical-file-does-not-exist-when-reading-from-SAS/m-p/495862#M130977</link>
      <description>&lt;P&gt;Thanks! Your code helped me remember that Excel Sheet name was a thing. Changed it in the code to match excel and it works now. Have a good weekend!&lt;/P&gt;</description>
      <pubDate>Sat, 15 Sep 2018 01:13:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DDE-ERROR-Physical-file-does-not-exist-when-reading-from-SAS/m-p/495862#M130977</guid>
      <dc:creator>chiangjx</dc:creator>
      <dc:date>2018-09-15T01:13:42Z</dc:date>
    </item>
  </channel>
</rss>

