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.
SAS doesn't do that by default AFAIK, though it's possible. Do you have code or a custom task your using?
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.
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?
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.