I have a piece of code in SAS that outputs to Excel using DDE and which works fine. I'm now trying to make it a little more dynamic, but I can't figure out how to write the path line (2. line) to the Excel file.
options noxwait noxsync;
x '"c:\Folder\excelfile_&date_yyyymmdd\Holding\Holding.xls'";
/* Putting SAS in sleep mode to give Excel the necessary time to open the file */
data _null_; x=sleep(5);
run;
FILENAME TEST DDE "EXCEL|SV01-01!r8c2:r20000c29" notab;
DATA _NULL_;
SET le_hk3;
It works fine when I replace the macro variable with it's value and it also seems to be resolving correctly but it still doesn't open the file. The log says the file doesn't exist. I've tried using double quotes, double and triple dots "..xls" in various combinations, but it still doesn't work.