BookmarkSubscribeRSS Feed
LisaSAS
Obsidian | Level 7

I'm not sure if this is the place to post this, if not, please let me know the proper place.  I created a project in EG using proc report to create an excel spreadsheet that has 3 different tabs and then email the file.  This is placed in a macro so it can go through a loop within a file to grab specific information for a region and then email to that regions manager.  This works perfect in EG, however, when I put this as a job in DIS - using the exact same code - my email gets sent with the attachment, however I can't open it, it's telling me the file is corrupt.  Every email for every file I'm creating is corrupt.  What's the difference?  What do I need to modifiy in DIS to make this work?

Thanks!

 

3 REPLIES 3
SASKiwi
PROC Star

The problem you are getting could be this one:

 

http://support.sas.com/techsup/notes/v8/18/345.html

 

You need to ensure that the content type option is set when emailing so when you try to open the attachment it knows what to open it with.

Cynthia_sas
SAS Super FREQ
I agree...and another possibility is that you might be using ODS TAGSETS.MSOFFICE2K_X or ODS TAGSETS.EXCELXP that generally work fine in EG, but may not work on the server that you are using for DI Studio. If changing the content-type header doesn't do the trick for you then you might want to open a track with Tech Support.

cynthia
ballardw
Super User

I recently ran into an example of an XLS file that Excel said was corrupted and couldn't get it to open in Excel. But proc import could read it.

I take that as another reason to avoid Excel format files and recommend considering CSV. Yes CSV doesn't support multiple tabs. Since you say this is proc report output perhaps RTF would be acceptable.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 3 replies
  • 1061 views
  • 0 likes
  • 4 in conversation