DATA Step, Macro, Functions and more

DDE error in writing Excel spreadsheet

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

DDE error in writing Excel spreadsheet

I have a macro that uses DDE to write an Excel workbook with several worksheets.  The name of the workbook is a concatenation of the path name, a string constant, and a macro variable that contains the product name.  I need to update the macro to add an invocation for a new product that has a slash in the name, as in %let product = 'Product This/That'.  For that run, the workbook is not created, and the message in the log is

ERROR: DDE session not ready.

FATAL: Unrecoverable I/O error detected in the execution phase of the DATA step program.

            Aborted during the EXECUTION phase.

I have tried %quote with the variable assignment, and the SYMBOLGEN parameter indicates that the variable is resolving correctly. I've also tried increasing the sleep time. The workbook appears to be correctly populated in my Excel display. The macro works fine for all other invocations in the SAS program, before and after this one. Does anyone have an idea about why it works for all the macro variable values except that one?


Accepted Solutions
Solution
‎07-28-2011 04:15 PM
PROC Star
Posts: 7,492

DDE error in writing Excel spreadsheet

If you are on some version of windows, I don't believe that character is valid in a filename as it is the indicator for a subdirectory.

View solution in original post


All Replies
Super Contributor
Posts: 356

DDE error in writing Excel spreadsheet

Remove SAS from the picture and try and manually create a workbook and/or sheet, called  'Product This/That' - does it work?

New Contributor
Posts: 3

DDE error in writing Excel spreadsheet

Posted in reply to twocanbazza

No, it doesn't.  Thanks for the idea!  I thought only a backslash would be a problem, but that showed me the forward slash doesn't work either.

Solution
‎07-28-2011 04:15 PM
PROC Star
Posts: 7,492

DDE error in writing Excel spreadsheet

If you are on some version of windows, I don't believe that character is valid in a filename as it is the indicator for a subdirectory.

New Contributor
Posts: 3

DDE error in writing Excel spreadsheet

You are right!  I thought it would only balk at the backslash.  Thanks to you and to twocanbazza!  I've been trying to get past this problem for a long time.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 1813 views
  • 3 likes
  • 3 in conversation