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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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