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