[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Re: DDE problem: SAS to Excel
From:       Howard Schreier <Howard_Schreier () ITA ! DOC ! GOV>
Date:       2004-02-28 16:58:43
[Download RAW message or body]

DDE is a low-level tool. Basically, it just provides a connection between
SAS and EXCEL. It's up to you to write code for the client (SAS) which will
pull or push stuff over that connection.

If it "works fine", you probably have a DATA step something like this:

   data _null_;
   set ...
   file ...
   put a '09'x b '09'x c ....
   run;

where A, B, C, etc. are your variable names. To get the names of the
variables in the first row, insert a statement like

   if _n_=1 then put 'a' '09'x 'b' '09'x 'c' ....

before the existing PUT statement.

No complicated macros, but of course this is hard coded for a specific
series of variables and thus not very flexible. It would be in
generalization that you would get into macro usage.

On Fri, 27 Feb 2004 16:47:34 -0800, FJ <fakyjunky@YAHOO.COM> wrote:

>I'm using DDE to export a SAS dataset into Excel. It works fine,
>except the variable names do not get exported. I only get the data in
>my spreadsheet.  How can I export the entire dataset including
>variable names?  Is there a solution not involving complicated macros?
> Thanks for any suggestions.
>FJ

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic