BookmarkSubscribeRSS Feed
hellohere
Pyrite | Level 9

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). 

5 REPLIES 5
hellohere
Pyrite | Level 9

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;

Kurt_Bremser
Super User

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?

hellohere
Pyrite | Level 9

e... just restart SAS and the file is deleted. 

hellohere
Pyrite | Level 9

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

Kurt_Bremser
Super User

Please do always (as in ALWAYS) post logs by copy/pasting into a window opened with this button:

Bildschirmfoto 2020-04-07 um 08.32.59.jpg

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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 751 views
  • 0 likes
  • 2 in conversation