Hi SAS Gurus, I am new to SAS Programming. Currently using SAS 9.3 EG and struggling with DDE & Excel. I am trying to import / read data from Excel 2007. I am getting error during running the code and excel file is opening. Here is the code & error below: Libname para 'c:\sasbaseprep'; /* Read an Excel spreadsheet using DDE */ OPTIONS NOXSYNC NOXWAIT; X '"C:\SASBASEPrep\GASPRICESUS.XLSX"'; data _null_; X=sleep(3); run; FILENAME gas DDE 'EXCEL|C:\SASBASEPrep\[GASPRICESUS.XLSX]Sheet1!A1:B51'; DATA para.readexcel; INFILE gas NOTAB DLM='09'X DSD MISSOVER; informat Avg_price 4.3; INPUT US_State $ 1-30 Avg_Price 4.3; format Avg_price 4.3; RUN; Proc Print data=para.readexcel; title 'Read / Import data from MS Excel'; run; data _null_; file gas; put '[FILE-CLOSE("C:\SASBASEPrep\GASPRICESUS.XLSX")]'; put '[QUIT()]'; run; ERROR: DDE session not ready. FATAL: Unrecoverable I/O error detected in the execution of the DATA step program. Aborted during the EXECUTION phase. NOTE: 1 record was read from the infile GAS. The minimum record length was 0. The maximum record length was 0. NOTE: The SAS System stopped processing this step because of errors. Can anyone please help me what is wrong with the code and how to fix it. I tried unchecking the option in Excel "Ignore other applications that use DDE", but no success. Thanks in advance Raj.
... View more