0
votes

I suddenly got an error message when exporting from SAS to Excel. I've been using the code below.

libname xls excel '..\Test.xlsx' ver=2007;

proc datasets lib = xls nolist;
delete Sweden;
quit;

data xls.Sweden;
set WORK.falcon_cases_2;
run;

libname xls clear; 

This is what the log says:

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 4865 observations read from the data set WORK.FALCON_CASES_2.
WARNING: The data set XLS.Sweden may be incomplete. When this step was stopped there were 4864 observations and 14 variables.
ERROR: ROLLBACK issued due to errors for data set XLS.Sweden.DATA.

That's the error message I got. I've googled the error message and it seems like it usually indicates that the data set contains to many rows for Excel, 65 000 something. The data set I'm trying to export is only about 5500 rows.

Thanks for your help!

1
Check the 4865th row in your data, is there anything unusual about the data in that row?mjsqu

1 Answers

0
votes

Things I would look into:

  • Funny characters. Excel might have had a transcoding problem if there are unicode characters in the data that don't transcode properly to wlatin1 (or whatever your default encoding is for Windows).
  • Disk space. Did your disk run out of space while running this?
  • Network or disk corruption. Is this replicable (does it occur if you try again)?

Can you try running that code on a basic dataset, like sashelp.class? Does that still cause the problem?