I have no trouble making an XLS file on SAS On Demand and then downloading the file to my personal computer and opening it with the Numbers application on MacOS.
73 %put &=sysvlong;
SYSVLONG=9.04.01M8P022223
74 filename xls '~/example.xls';
75 proc export data=sashelp.class dbms=xls file=xls replace;
76 run;
NOTE: The export data set has 19 observations and 5 variables.
NOTE: "XLS" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.30 seconds
cpu time 0.06 seconds
And it does not matter if the file already exists. The existing file is overwritten with a new good XLS file.
73 %put &=sysvlong;
SYSVLONG=9.04.01M8P022223
74 filename xls '~/example.xls';
75 data _null_;
76 file xls;
77 put 'garbage';
78 run;
NOTE: The file XLS is:
Filename=/home/tom.abernathy/example.xls,
Owner Name=tom.abernathy,Group Name=oda,
Access Permission=-rw-r--r--,
Last Modified=10Jun2026:11:29:46
NOTE: 1 record was written to the file XLS.
The minimum record length was 7.
The maximum record length was 7.
NOTE: DATA statement used (Total process time):
real time 0.88 seconds
cpu time 0.05 seconds
79 proc export data=sashelp.class dbms=xls file=xls replace;
80 run;
NOTE: The export data set has 19 observations and 5 variables.
NOTE: "XLS" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.68 seconds
cpu time 0.08 seconds
Perhaps you are trying to write to a file that is already open in another application?
Perhaps you downloaded the wrong file?
Perhaps you have something wrong in your SAS installation? Open a ticket with SAS support.
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →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.