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 (December 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 31 Dec 2008 11:04:49 -0500
Reply-To:     Jeff <zhujp98@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jeff <zhujp98@GMAIL.COM>
Subject:      dde does not close excel
Content-Type: text/plain; charset=ISO-8859-1

filename ddecmd dde 'excel|system'; *

data* _null_;

file ddecmd;

put '[FILE-OPEN("C:\TEMP\definitionT.xls")]'; *

run*;

*;

/* specify desired Excel worksheet cell range */

*;

filename xlin DDE 'excel|C:\TEMP\[definitionT.xls]definitionT!r2c1:r5c3'; *

run*;

*;

/* read Excel files using DDE into SAS data set*/

*; *

data* test;

infile xlin dlm='09'x notab missover dsd;

informat id *8.* type $20. label $200.;

input id type label;

format id *8.* type $8. label $200.; *

run*;

*; /* close Excel workbook and close Excel * I have trouble with this code*/ /****************** ******************* *

data* _null_;

file xlin;

put '[FILE-CLOSE("C:\TEMP\definitionT.xls")]';

put '[QUIT()]'; * run*;

The last snip of code supposes to close excel work book and excel. When i run it, this code wrote two lines into definitionT.xls without closing it. The opened definitionT.xls has

id type label [FILE-CLOSE("C:\TEMP\definitionT.xls")] [QUIT()]

Inside.

How can I fix this problems? Thanks. Jeff


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