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 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 24 Oct 2008 19:17:54 -0400
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: dde excel spreadsheet doesn't get updated with values
Comments: To: zalazhar@GMAIL.COM


This is an identical post to the one you put on the list earlier.

Howard already suggested that your code works and that you should post your log so that others can see what happened.

Before you do, you may want to correct a couple of things:

First, you assign two different directories to the bron libname. Only the second one will be in effect during your run. Is that the one where your SAS file is?

Second, your statement to open the desired worksheet >'excel|[Analyse Movir Sjabloon.xls]uitvoer!r1c1:r1c1' will only write one data point in the first column of the first row. Is that what you wanted to do?

Art -------- On Fri, 24 Oct 2008 13:33:39 -0700, Zakaria <zalazhar@GMAIL.COM> wrote:

>Hi all, > >I'm expirementing with dde to update a spreadsheet with data from SAS. >Somehow the data is not written to the spreadsheet, even the log says >so. I >have SAS 8 and excel 2002, using the following code: >libname bron 'd:\weggooi'; > > > >libname bron 'H:\Bronnenanalyse'; > > >/******************************************* > >Fire up MS Excel, method 2 by Chris Roper. > >*******************************************/ > >options noxsync noxwait; > >filename sas2xl dde 'excel|system'; > >data _null_; > >length fid rc start stop time 8; > >fid=fopen('sas2xl','s'); > >if (fid le 0) then do; > >rc=system('start excel'); > >start=datetime(); > >stop=start+10; > >do while (fid le 0); > >fid=fopen('sas2xl','s'); > >time=datetime(); > >if (time ge stop) then fid=1; > >end; > >end; > >rc=fclose(fid); > >run; > > > >/********************************* > >Open an existing Excel workbook: > >'existing workbook.xls' > >*********************************/ > >data _null_; > >file sas2xl; >put '[open("h:\bronnenanalyse\Analyse Movir Sjabloon.xls")]'; > >run; > >filename >test >dde >'excel|[Analyse Movir Sjabloon.xls]uitvoer!r1c1:r1c1' >notab; > >data _null_; > >set bron.verloop_beroep_mov; > >file test; > >put kode_ber; > >run;

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