ERROR: DDE session not ready.

Reply
Contributor lei
Contributor
Posts: 37

ERROR: DDE session not ready.

[ Edited ]

Hi,

 

I am trying to run the macro attached from the University of Sidney. However, I keep on getting an error that says when trying to link to excel file

 

"ERROR: DDE session not ready.
FATAL: Unrecoverable I/O error detected in the execution of the DATA step program.
Aborted during the EXECUTION phase."

 

Can anyone help?

 

 

I have attached the log here too.

 

Thank you.

Attachment
Super User
Super User
Posts: 7,977

Re: ERROR: DDE session not ready.

Well, it could be a number of things - your working on University Edition which has different pathing, or the file doesn't exist in that location, or its not really an Excel file, or maybe you don't have MS Office installed on the SAS machine etc.  

 

As for the code, I would advise against using DDE, it is really old, and in some circumstances does not work - nor is it supported anymore.   A brief glance at the code shows it was written in 2006, some tens years ago - things have moved on quite a ways since then.  I would pull out what code you really need and do it yourself.

Contributor lei
Contributor
Posts: 37

Re: ERROR: DDE session not ready.

Is it possible that I am on a remote server so it's not working. However, when I run the first part, excel does start up. Also, I am not using Univresity. I am on full sas.

 

I know DDE is old. Is there another way to export things out to specific spots in excel?

Super User
Super User
Posts: 7,977

Re: ERROR: DDE session not ready.

Yep, thats quite likely.  DDE links directly to the Office install on the machine, so it generally doesn't work on networks.  

 

As for exporting data to Excel, it depends what you mean.  Odstagsets.excelxp can put outputs on specific sheets, give specific positions etc.  Libname excel can also do things, but you will need to read up on them.  If you have a template made in Excel - which could be anything - then its difficult to say the least and in my opinion very bad practice to be aiming things at specific cells - I mean if the template changes all your code needs to change its just bad all through.  I would either generate new feiles each time from SAS based on the data, or find a way to import things into your Excel template - i.e. export from SAS using standard program, then in Excel have  VBA macro which loads them into the relevant area.  Although the best solution of all is to stop using Excel as its not a good fit for any purpose.

Super User
Posts: 5,434

Re: ERROR: DDE session not ready.

Adding to the options put forward by @RW9, the Addin for MS Office will give you a great deal of power to design your Excel report.
Data never sleeps
Ask a Question
Discussion stats
  • 4 replies
  • 1418 views
  • 0 likes
  • 3 in conversation