BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Lety08
Calcite | Level 5

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\Capstone
Documentation\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;

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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.

View solution in original post

4 REPLIES 4
Reeza
Super User

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" ;
Lety08
Calcite | Level 5

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. 

Reeza
Super User

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.

Lety08
Calcite | Level 5

thanks Reeza

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

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.

Discussion stats
  • 4 replies
  • 778 views
  • 0 likes
  • 2 in conversation