Regarding point 3, yes I have tried it, but only on 9.1.3. On 9.1.3
my log shows the following:
ERROR 180-322: Statement is not valid or it is used out of proper
Is it now possible with 9.2? If not, are you simply overwriting
On Feb 27, 7:41 pm, neil <nei...@gmail.com> wrote:
> 1 and 2 my typo.
> 3, dbms=xls does support sheet. Have you ever tried?
> 4. The problem is, after you open and change the excel file, then
> export another dataset to the same excel file, the date format will be
> On Feb 27, 9:35 am, art...@NETSCAPE.NET (Arthur Tabachneck) wrote:
> > Neil,
> > Unless a number of things have changed in 9.2, I'd guess that you and
> > SAS are simply interpreting your statements differently.
> > A number of things:
> > 1. I don't think the proc export command is supposed to end with a
> > semi-colon.
> > 2. when you specified dmbs did you mean dbms?
> > 3. I don't think that the xls engine supports the sheet= option
> > 4. I think that the xls engine formats all dates and datetimes as
> > date9 unless you set the sas system option (I'm not sure if I remember
> > the correct option name but it is something like) sasdatefmt.
> > HTH,
> > Art
> > -------------
> > On Feb 27, 5:33 am, neil <nei...@gmail.com> wrote:
> > > I think it's very weird. And it's very easy to reproduce the problem.
> > > SAS 9.2 (32-bit/64-bit)
> > > proc export data=whatever_dataset_with_datetime;
> > > outfile='path\filename'
> > > dmbs=xls replace;
> > > sheet='01';
> > > run;
> > > Note: the reason I am using "dbms=xls" instead of "dbms=excel" is xls
> > > is only option in 64-bit sas. This "XLS" causes the following problem.
> > > After you submit it, everything is fine.
> > > OPEN the excel and SWITCH two columns, THEN SAVE it.
> > > run the same code again but with sheet='02', open the excel file, you
> > > will find the date format in sheet02 is LOST.
> > > Do you know what's the fix?
> > > Thanks- Hide quoted text -
> - Show quoted text -