BookmarkSubscribeRSS Feed
arunmmw
Fluorite | Level 6

Hi,

 

We run a lot of projects using SAS enterprise guide and export the results in excel using enterprise guide export to excel option (SAS runs in Unix, enterprise guide in windows, file exports in Windows).

 

When exporting, SAS appends the file name with _verXXXXX e.g. "testfile_ver20140328081702.xls" (do not overwrite option checked).

 

Is there anyway to turn this _ver with just e.g "testfile_20140328.xls"? so everytime we export a file, this new file would end up with this DDMMYYYY format even it means to overwrite previously created files.

 

Thanks for your help.

3 REPLIES 3
Reeza
Super User

SAS doesn't do that by default AFAIK, though it's possible. Do you have code or a custom task your using? 

ChrisHemedinger
Community Manager

I know what @arunmmw is talking about, @Reeza.  It's a feature in EG that allows you to export an Excel file.  EG writes the Excel file -- not SAS -- in this case.  And the "don't overwrite" option causes EG to append a datetime stamp to generate a unique name.

 

I'm going to assume that you don't have SAS/ACCESS to PC Files available to use PROC EXPORT to XLSX.  But if you have the latest version of SAS 9.4, you could use ODS EXCEL to create the Excel file on Unix directly (no SAS/ACCESS needed).  You can use SAS code to name the file based on the date.  And if you need the file to end up on Windows, you can download using the Copy Files task.  I have the makings of an example in this blog post.

 

 

SAS Innovate 2025: Call for Content! Submit your proposals before Sept 25. Accepted presenters get amazing perks to attend the conference!
arunmmw
Fluorite | Level 6

Thanks @Reeza@ChrisHemedinger. Chris, I could create excel files and move them to my unix drive, downloading them into Windows is our challenge. We use enterprise guide excel export option to export files to the required drive for our users to open them directly.

 

Your copy file task is a good solution (probably the only solution) i found. Does your copy file task work with shared drives (not mapped) as well? 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2117 views
  • 4 likes
  • 3 in conversation