From: KLR on
Hi

I am using the following code to export several datasets into separate
worksheets in one Excel workbook:-

libname myxls excel "S:\2009_10 Enquiries\3630\Output\0910-3630.xls";

data myxls.final02 (dblabel=YES);
set final02;
run;

data myxls.final08 (dblabel=YES);
set final08;
run;

libname myxls clear;


I get the following error message in the log (for all 9 datasets to be
exported (partial code above):-

1149 data myxls.final08 (dblabel=YES);
1150 set final08;
1151 run;

NOTE: SAS variable labels, formats, and lengths are not written to
DBMS tables.
ERROR: Execute: Unable to insert row
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 65536 observations read from the data set
WORK.FINAL08.
WARNING: The data set MYXLS.final08 may be incomplete. When this step
was stopped there were
65535 observations and 9 variables.
ERROR: ROLLBACK issued due to errors for data set MYXLS.final08.DATA.
NOTE: DATA statement used (Total process time):
real time 1.28 seconds
cpu time 1.28 seconds


The workbook is created and the data appears in there however.

Any ideas what is causing the error message and how to resolve it?

Thanks in advance!
From: KLR on
On 23 July, 11:53, KLR <k.robe...(a)ucas.ac.uk> wrote:
> Hi
>
> I am using the following code to export several datasets into separate
> worksheets in one Excel workbook:-
>
> libname myxls excel "S:\2009_10 Enquiries\3630\Output\0910-3630.xls";
>
> data myxls.final02 (dblabel=YES);
>         set final02;
> run;
>
> data myxls.final08 (dblabel=YES);
>         set final08;
> run;
>
> libname myxls clear;
>
> I get the following error message in the log (for all 9 datasets to be
> exported (partial code above):-
>
> 1149  data myxls.final08 (dblabel=YES);
> 1150      set final08;
> 1151  run;
>
> NOTE: SAS variable labels, formats, and lengths are not written to
> DBMS tables.
> ERROR: Execute: Unable to insert row
> NOTE: The SAS System stopped processing this step because of errors.
> NOTE: There were 65536 observations read from the data set
> WORK.FINAL08.
> WARNING: The data set MYXLS.final08 may be incomplete.  When this step
> was stopped there were
>          65535 observations and 9 variables.
> ERROR: ROLLBACK issued due to errors for data set MYXLS.final08.DATA.
> NOTE: DATA statement used (Total process time):
>       real time           1.28 seconds
>       cpu time            1.28 seconds
>
> The workbook is created and the data appears in there however.
>
> Any ideas what is causing the error message and how to resolve it?
>
> Thanks in advance!

Fixed it! As soon as I posted I saw the problem - file extension
should be xlsx rather than xls as the datasets exceed the row limit
for Excel 2002 :)