I am trying to export a table to excel, but I cannot get it work.
I get this error message
ERROR: Insufficient authorization to access /opt/sasinside/SASConfig/Lev1/SASApp/D:\Users\Owner\Documents\CapstoneDocumentation\Item_Name.xlsx.
My code is
ods excel file="D:\Users\Owner\Documents\Capstone Documentation\Item_Name.xlsx" ; proc FREQ data=auction.clean3 ; TABLE LI_ITEM_NAME; run; ods excel close;
Your path needs to be exactly like mine if you're using SAS UE. No D drive or anything. SAS UE is running on a Virtual Machine, which is connected to your computer via that folder. It cannot connect to your hard drive except through the myfolders folder or any other folder you set up.
This path is not accessible via SAS then:
ods excel file="D:\Users\Owner\Documents\Capstone Documentation\Item_Name.xlsx" ;
Are you using SAS in the cloud (Academics on Demand), SAS University Edition or a server based SAS installation? You need to find the path to where you can save the file and provide a valid path and then it will work fine.
If you're using SAS UE then it should be along the lines of the following and will be in the shared folder myfolders that you set up during installation.
ods excel file="/folders/myfolders/Item_Name.xlsx" ;
I see what you said, and thanks for your advice.
I changed the code, but I still do not get the file.
ods excel file="D:/Users/Owner/Documents/SAS University/myfolders/Item_Name.xlsx" ; proc FREQ data=auction.clean3 ; TABLE LI_ITEM_NAME; run; ods excel close;
This time, the log is empty, and only gives me results.
Your path needs to be exactly like mine if you're using SAS UE. No D drive or anything. SAS UE is running on a Virtual Machine, which is connected to your computer via that folder. It cannot connect to your hard drive except through the myfolders folder or any other folder you set up.
thanks Reeza
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.