Hi All, I'm trying desperately to determine what is invalid in this code. I have an excel template .xlsb already created and I'm trying to export my output into it. I keep getting "invalid device type, error in the FILENAME statement" and it appears to be the only thing that's keeping the rest of the code from running. I'm using SAS9.3, 64bit version. Excel is the 32bit version. Could someone help point me in the right direction? options mprint; x '"C:\Program Files (x86)\Microsoft Office\Office14\excel.exe"'; data _null_; x=sleep(30); run; data _null_; file sas2x1; put '[Open("C:\My Documents\TEMPLATE.xlsb")]'; run; filename sas2x1 dde 'excel|WHSE_10!r7c1:r150c57' lrecl=1024; data _null_; set Staci.whse_10; file sas2x1; put var1 '09'x var2 '09'x var3 '09'x var4 '09'x var5; run; data _null_; file sas2x1; put '[error(false)]'; cmnd = '[save.as("C:\My Documents\Testing_DDE.xlsb"".xlsb")]'; put cmnd; put '[file.close(true)]'; put '[quit()]'; run; On another note, when I try running the x command below, I get errors saying the first two are unrecognized SAS option names: options noxwait noxsync mprint; x '"C:\Program Files (x86)\Microsoft Office\Office14\excel.exe"'; Thanks, Staci B
... View more