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.

 

 

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
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-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!

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