Planning Analytics

 View Only
  • 1.  PAX API script for Automation

    Posted Tue September 24, 2024 04:38 PM

    Hi, 

    I am trying to run the below VB script to automate the refresh for my PAX template in C:\Book1.xlsm where I have simple DBRW formulas to pull the data. 

    I have imported the required .bas and .cls files in C:\Book1.xlsm and saved it. 

    ' Start Excel in batch mode

    Set objExcel = CreateObject("Excel.Application")
    objExcel.Visible = False
    objExcel.ScreenUpdating = False
    objExcel.DisplayAlerts = False

    'Open a workbook that has IBM Cognos data in it.
    Set objWorkbook = objExcel.Workbooks.Open("C:\Book1.xlsm")
    ' Call the wrapper macros
    objExcel.Run "Logon", "<pax URL>","<Login ID>", "<Password>", "<CAM NAMESPACE>"
    objExcel.Run "RefreshAllData"
    objExcel.Run "UnlinkAllData"
    objExcel.Run "Logoff"

    objExcel.Run "WriteTraceLog", "C:\AutmationLogFromString.log", objExcel.Run("TraceLog")
    objWorkbook.Save
    objWorkbook.Close
    objExcel.Quit

    I get the below pop up for 3 times and I don't see the template is refreshed with the data. Nothing in trace log.

    Please let me know if I am missing something. 

    PAX Version:55

    PAW Version:54 



  • 2.  RE: PAX API script for Automation

    Posted Tue September 24, 2024 05:48 PM

    Try creating a separate workbook , import the BAS and code etc and run from there  

    Without getting into this too much you are  creating a new instance of Excel ( You already have one open)  and then trying to open the current open workbook.  You would also want to make it visible with screen updating so you can see what's going on

    You are better off seeing if someone can give you a working example (In a workbook) with good object references in the code.



    ------------------------------
    John O'Leary
    ------------------------------



  • 3.  RE: PAX API script for Automation

    Posted Wed September 25, 2024 07:58 AM

    Hello,

    We're an IBM Business Partner and offer for sale an application called ReportWORQ that provides this type of automation for your PAfE/PAx Reports. You can learn more about it at the links below

    IBM Partner Site: https://www.ibm.com/products/planning-analytics/partners/quebit-reportworq 

    ReportWORQ Website: https://reportworq.com

    Thank You,

    -Andy Weiss



    ------------------------------
    Andrew Weiss
    ------------------------------