I was wondering if it's possibile to build a push button in Excel 2007 to automate (after proper login to metadata server) the download from a WRS report.
The report has several prompts.
I tried to record and assign a macro-button for that but does not seems to work; the macro doesn't work too.
Any tips about?
I'm using WRS and Addin for Office 4.2 on SAS 9.2 M2.
It is possible with the SAS Add-in to Microsoft Office (AMO) 4.3 (due to quite a few scripting improvements), but not in AMO 4.2. With AMO 4.3, you could associate VBA code similar to the following with your push button:
Dim SAS As SASExcelAddIn
Dim report As SASReport
Dim pathToReport As String
Dim destination As Range
Set pathToReport = "/BIP Tree/ReportStudio/Shared/Reports/Sonny/SimpleSuite/TablewithTotals.srx"
Set destination = ActiveCell
Set SAS = Application.COMAddIns("SAS.ExcelAddIn").Object
Set report = SAS.InsertReportFromSasFolder(pathToReport, destination)
In addition to inserting reports, in AMO 4.3 you can also programmatically open data, run stored processes, create Pivot Tables, modify and refresh content, among other things.
Note: Using Excel's Record Macro feature does not capture AMO operations.