|
On Mon, 1 Mar 2004 16:24:27 -0800, Ixnay <mscgloss@YAHOO.COM> wrote:
>Hello All,
>
>I know that this issue has been covered ad nauseum, but I'm having a
>problem I can't seem to find an answer for.
>
>I need to export a SAS generated dataset to excel. I used to use PROC
>EXPORT, but need to use ODS at my new job. The code I've written
>doesn't generate any errors, but the dataset that it creates,
>'results.xls' is always empty.
>
>Essentially what I do, and what I want to do is this: I create many
>datasets using PROC SQL. I then merge, sort, and do all kinds of
>other good stuff to the data to create the final data set: data_fina.
> I would then like to export this dataset, 'data_final' to excel.
>
>A collegue here at work gave me some code to use, and from this I have
>written the following, which generates the empty excel files:
>
>
>ods html file = 'C:\results.xls'
> contents = 'data_final'
> style = statdoc;
>
>[in here I have code that manipulates data and as an output creates
>'data_final']
>
>ods html close;
>
>Thanks for any and all help,
>
Hi, Mike,
"contents=" in ods html statement is to indicates the name of html file to
where the table of contents should go. V8 online doc says:
CONTENTS=
identifies the file that contains a table of contents to the HTML
output. The contents file links to the body file.
What you probably want to do, if you want to print all the data in the
dataset data_final is doing something like:
ods html file="c:\results.xls";
proc print data=data_final;
run;
ods html close;
Change the proc print with your favorate procedure. HTH
Cheers,
Chang
|