|Date: ||Wed, 4 Feb 2004 22:04:07 -0700|
|Reply-To: ||Alan Churchill <x@X.COM>|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|From: ||Alan Churchill <x@X.COM>|
|Subject: ||Re: Outputting a table to Excel|
I have a slightly different take on this issue. Once I got it into the raw
data form that I need, I would send it as XML to Excel and would not try to
use SAS for the formatting prior to the send.
For example (FYI, I am typing w/o testing):
libname excelout xml 'c:\temp\sasdata.xml' ;
proc transpose........out=execelout.records ;
I am not sure of what version of Excel you are using but XML seems to me the
best transport mechanism provided that the data isn't very large. If the
data is extreme, you wouldn't be using Excel in the first place ;-]
SAS supports CSV format as well which you could use. XML, to me, seems
cleaner and with a 64K row limit, your data is small enough to adequately
support XML format. You will probably need to mess with it once you get it
to Excel, FYI.
If you need more specific code, let me know.
"Peter" <firstname.lastname@example.org> wrote in message
> I need some help with how to output a "new" table to Excel. I am new to
> and only try and post on the newsgroup if I cannot find the answer myself.
> In this case I just cannot seem to find it...:(
> I input some data using the data step and then manipulate it into a format
> want using "proc transpose" or "proc tabulate". The problem is the "new"
> table I have created is displayed in the output window. I need to export
> the table to excel. I know where the data is stored that I read into sas
> using the data step, but it is not in the format I want.
> How do I output the "new" table?
> Thank you in advance for your help!