LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 9 Oct 2001 10:30:29 -0700
Reply-To:     "William W. Viergever" <wwvierg@ATTGLOBAL.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "William W. Viergever" <wwvierg@ATTGLOBAL.NET>
Subject:      Re: Sas to excel DDE issues
Comments: To: Tzachi Zach <zach@SSB.ROCHESTER.EDU>
In-Reply-To:  <nqqv7.618878$EF2.86664526@typhoon.nyroc.rr.com>
Content-Type: text/plain; charset="iso-8859-1"; format=flowed

At 10:24 PM 10/5/2001 +0000, Tzachi Zach wrote: >I have been using DDE to import SAS data sets into excel and then manipulate >the excel files for quite a while. I recently started getting the following >error, after successfully importing the data set into excel, and after >performing a fairly simple excel operation: > >ERROR: DDE session not ready. >FATAL: Unrecoverable I/O error detected in the execution of the data step >program. > Aborted during the EXECUTION phase. > > >Here is the code I am using. > >1. To open the excel file i run: > > filename sas2xl dde 'excel|system'; > > > data _null_; > file sas2xl; > length ddecmd $ 200 ; > put '[error(false)]'; > ddecmd='[open("'||"c:\my documents"||'\'||"erase me"||'")]'; > put ddecmd; >run; > >and i don't have a problem. The file opens perfectly (The extra quotes and >||'s are present because i originally had macro variables instead. I >switched to simple paths just for this post). > >However, when i run the following code to select a certain range in the >worksheet i get the error. > >data _null_; >file sas2xl; > length ddecmd $ 200 ; >put '[error(false)]'; >put '[workbook.activate(sheet1)]'; >ddecmd='[select("r1c4:r5c5")]';

Just a thought: I don't think you can SELECT disjoint ranges in this manner. Perhaps you've a typo (i.e., you meant R1C4:R5C4) or you'll need to repeat the selections to accomplish what you want.

>put ddecmd; >run; > >I get the same error if i want to perform other actions like formula.fill. > >I have looked at previous postings that mentioned this "DDE not ready" >business but they do not seem to apply. My excel is not busy with dialogues >and the worksheet is fairly small. >The closest thing i found is the issue Koen Vyverman deals with in page 6 of >"Using Dynamic Data Exchange to Export Your SASŪ Data to MS Excel" where the >workbook.name cannot be written directly to DDE. Here, however, i have the >activate function that used to work perfectly. > >As i mentioned, i have used the program for quite some time. One piece of >information that may be important is that i upgraded from SAS 8 to SAS 8.2 a >few days ago and this started to appear only after the upgrade. This may be >related but i have no clue how. Could it be that "workbook.activate" and >other functions like formula and formula.fill exhibit the same behavior like >workbook.name now? >I checked sas.com for any fixes but could >not find any except one that has to do with importing Access files to SAS >using DDE. > >Thanks, >Tzachi

------------------------------------------------------------ William W. Viergever Voice : (916) 483-8398 Viergever & Associates Fax : (916) 486-1488 Sacramento, CA 95825 E-mail : wwvierg@attglobal.net ------------------------------------------------------------


Back to: Top of message | Previous page | Main SAS-L page