BookmarkSubscribeRSS Feed
Ronein
Meteorite | Level 14

Hello

I want to send an email from SAS and attach a file.

I receive an error

 

ERROR: Error opening attachment file \\path\Report.xlsx.
ERROR: Physical file does not exist, \\path\Report.xlsx.

 

I check and the path is correct so I cannot understand what is the problem.

How can I check if the problem is with my authorization?

 

data _null_;
file sendit email
from="XXX@gmail.com"
to=("YYY@gmail.com")
subject="Important Document"
importance="High"
attach=("\\path\Report.xlsx");
put "Please find attached the file";
put;
put "Thanks!";
run;
5 REPLIES 5
Jagadishkatam
Amethyst | Level 16

Could you please check the path again. I believe this is not the correct path, could you share the screenshot of the actual path

 

\\path\Report.xlsx

 

Thanks,
Jag
Ronein
Meteorite | Level 14

The path is 100% correct.

I changed it in the post because I cannot write path of my work

 

 

Patrick
Opal | Level 21

@Ronein 

Can you read anything from this path via a "normal" libname or filename statement?

Have you by any chance the Excel opened via another application (i.e. via a local MS Excel)?

Ronein
Meteorite | Level 14

Hello

Excel file is not opened

Path is correct (If I go to start and paste the path then i can see the excel file)

 

 

Patrick
Opal | Level 21

@Ronein wrote:

Hello

Excel file is not opened

Path is correct (If I go to start and paste the path then i can see the excel file)

 

 


I assume you can see the path from your local machine. If SAS isn't installed on your local machine then this doesn't tell you if this path is also correct on the machine where SAS executes - that's why I've asked you if you're able to execute any filename or libname statement using this path. Just try: libname test '\\path'; This will already tell you if the path as such is accessible from the SAS side.

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

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 677 views
  • 0 likes
  • 3 in conversation