|
There are several ways to bring data to EXCEL.
One is to export to a CSV file, e.g. with delimiter ";". The results are
not too nice, but the data should be readable in EXCEL.
What EXCEL can deal very good with, is HTML. Why don't you write your data
in a nice HTML report with ODS and read that in EXCEL? All the attributes,
colors, traffic lighting, ... are transported with that. You can even try
to exchange the extension HTML to XLS, so with a double click EXCEL is
opened instead of a browser.
If you really want pure data to EXCEL (what about column headers? EXCEL is
no DB, where do you know from, what the data should mean?), just take a
OPTIONS PS=9999 LS=250;
PROC PRINT data=... NOOBS; RUN;
Gerhard
On Fri, 12 Sep 2008 09:55:06 -0500, Mary <mlhoward@AVALON.NET> wrote:
>I don't have unix, but could you not export a file in XML rather than
using
>proc export? I find this keeps formatting much better, and an XML file
>should be able to be transferred across systems, because that is actually
>what it was designed to do.
>
>Here is an example; not sure how to translate it to UNIX, as it has been a
>while:
>
>ods listing close;
>ods tagsets.excelxp file='C:\Work_Activities\controls.xml'
>style=analysis
>options
(absolute_column_width='20,10,8,10,10,8,15,8,15,8,15,15,8,15,8,15,10,10,20'
>sheet_label=' ');
>
>ods tagsets.excelxp options(sheet_name="Control Raw Data");
>title 'Controls Raw Data';
>proc print data=affymetrix_set;
>var sample_name disease_grouping1 disease_grouping2 glaucoma_group4
>glaucoma_group5 age;
>where disease_grouping1='1';
>run;
>
>ods tagsets.excelxp close;
>ods listing;
>
>-Mary
>----- Original Message -----
>From: Kiran Nallapeta
>To: SAS-L@LISTSERV.UGA.EDU
>Sent: Friday, September 12, 2008 7:25 AM
>Subject: Export Data to Excel in Unix
>
>
>Hi All,
>
>I need to export data from a dataset to an excel file using a SAS Job
which
>is running on a Solaris/Unix OS machine. Is there a way to do the same?
>
>As SAS Access to PC files doesnt exist for Unix machine, I tried to do the
>above using something like below...
>
>proc export data=application_master
>
outfile="/gmt/data/us/Walmart/IVR/data/repository/appl_master.xls"
> dbms=dlm
> replace;
> delimiter="09"x;
>quit;
>
>But what is happening when I am doing the above is.... its sometimes
>inserting a carriage return at the end / in between a particular record
>hence breaking those records to different lines. So is there a way I can
>export data to an excel file on Unix?
>
>Thanks,
>NK
>
>_________________________________________________________________
>Searching for the best deals on travel? Visit MSN Travel.
>http://in.msn.com/coxandkings=
|