- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to export SAS dataset to an excel file. However, when I run the code, Sas only create this type of file "$$1" and not a excel file.
Here is the code:
PROC SORT DATA= Data; BY Y; RUN;
PROC MEANS DATA= Data;
VAR X;
BY Y;
OUTPUT OUT= Y SUM=;
RUN;
proc export data=Data
outfile= "xxxxxx/DATA.xlsx"
dbms=xlsx replace;
sheet='Y';
run;
and here is the log:
ERROR: Resource is write-locked by another thread. File =/xxxxxx//Y.$$1. Error creating temporary file for XLSX file -> /xxxxxxx/Y.$$1 . It is either not an Excel spreadsheet or it is damaged. Error code=80001019 Requested Output File is Invalid ERROR: Export unsuccessful. See SAS Log for details. NOTE: The SAS System stopped processing this step because of errors.
Thank you
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@dmarques1998 wrote:
Have reupload with the log.
Failure to follow instructions: the "log" does not show any of the code. It should start with the Proc statement.
The bit posted does show that something else is likely using your file. Possibly a previous failed attempt to write, or opening the file, or possibly even an operating system error message window is open somewhere. So you need to find which program, and if this is on a file system where other's may have access to the file which user, and get that process stopped.
ERROR: Resource is write-locked by another thread. File =/xxxxxx//Y.$$1. Error creating temporary file for XLSX file -> /xxxxxxx/Y.$$1 . It is either not an Excel spreadsheet or it is damaged. Error code=80001019 Requested Output File is Invalid ERROR: Export unsuccessful. See SAS Log for details. NOTE: The SAS System stopped processing this step because of errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@dmarques1998 wrote:
Hi,
I'm trying to export SAS dataset to an excel file. However, when I run the code, Sas only create this type of file "$$1" and not a excel file.
/*STA*/ PROC SORT DATA= Data; BY Y; RUN; PROC MEANS DATA= Data; VAR X; BY Y; OUTPUT OUT= Y SUM=; RUN; proc export data=Data outfile= "xxxxxx/DATA.xlsx" dbms=xlsx replace; sheet='Y'; run;
Thank you
What does your LOG show for the Proc Export? Copy the text from the LOG starting with the "Proc Export" and include all of the notes and messages. On the forum open a text box and paste the log.
Generally things like "$$1" indicate at some point the file system is having an issue of some sort and usually has something in the log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@dmarques1998 wrote:
Have reupload with the log.
Failure to follow instructions: the "log" does not show any of the code. It should start with the Proc statement.
The bit posted does show that something else is likely using your file. Possibly a previous failed attempt to write, or opening the file, or possibly even an operating system error message window is open somewhere. So you need to find which program, and if this is on a file system where other's may have access to the file which user, and get that process stopped.
ERROR: Resource is write-locked by another thread. File =/xxxxxx//Y.$$1. Error creating temporary file for XLSX file -> /xxxxxxx/Y.$$1 . It is either not an Excel spreadsheet or it is damaged. Error code=80001019 Requested Output File is Invalid ERROR: Export unsuccessful. See SAS Log for details. NOTE: The SAS System stopped processing this step because of errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content