BookmarkSubscribeRSS Feed
kbone1975
Fluorite | Level 6

I'm not sure if this is possible, but I am wanting to save an Excel workbook that is populated using the SAS Add-In with the date the file was run in the filename. (EX.-reportname_ddmmyyyy.xlsx). I have a copy file macro that one of my teammates used to accomplish this in EG, but wasn't sure if this will translate to the Add-In. This is part of an automation effort, so minimal touches of the file are necessary. I am fairly new to SAS, so I apologize if this is a simple answer I missed or if it's just not possible.

1 REPLY 1
FredrikE
Rhodochrosite | Level 12

I think the easiest would be to create a VBA-script that refreshes the data and then save the file with the dynamic file name.

 

Use this code to connect top sas and refresh the data:

 

Dim sas As SASExcelAddIn

Set sas = Application.COMAddIns.Item("SAS.ExcelAddIn").Object
sas.Refresh ThisWorkbook

 

//Fredrik

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!

Discussion stats
  • 1 reply
  • 870 views
  • 0 likes
  • 2 in conversation