Using proc export to dump dataset into an xlsx file. It used to fine. Somehow this time it does not success.
It created a file and cannot be deleted(prompt says it is being used in SAS).
The files created shown as vrf_summ_1100_all_2var.$$1
%let outds=vrf_summ_&ts._all_2var;
proc export data=&outds.
outfile="C:\sasOUT\&outds..xlsx"
dbms=xlsx replace; run;quit;
Does your problem arise in SAS? If yes, post the complete log of the failing step.
If not: what kind of storage do you use for your Excel file?
e... just restart SAS and the file is deleted.
Now it is fine. It used to "it is not spreadsheet or it is damaged" alike.
MPRINT(BL_SUMM): proc export data=vrf_summ_1100_all outfile="C:\Users\24891\Desktop\sasOUT\vrf_summ_1100_all.xlsx" dbms=xlsx replace; MPRINT(BL_SUMM): WXLX; MPRINT(BL_SUMM): run; NOTE: The export data set has 4752 observations and 8 variables. NOTE: "C:\Users\24891\Desktop\sasOUT\vrf_summ_1100_all.xlsx" file was successfully created. NOTE: PROCEDURE EXPORT used (Total process time): real time 0.21 seconds cpu time 0.18 seconds
Please do always (as in ALWAYS) post logs by copy/pasting into a window opened with this button:
so that all formattng is kept. The "little running man" right next to it is for posting SAS code (it provides coloring similar to the SAS Enhanced Editor).
The behavior of Windows with regards to when open files are closed is erratic, to say the least. It may also be that you have some background activity (malware protection) that automatically scans Excel files when such arrive in the filesystem.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.