HI Siew,
Did you previously enable the IBM Framework for Office as a COM add-in as well?
Without this you will get various errors as oCOAutomation objects will always be "nothing".
With PAfE 2.0.65 onwards, make sure that all PAfE and the IBM framework have been uninstalled.
I had an issue where my installation was not showing in Add or Remove Programs and I had to run the Uninstall from the folder in C:\Program Files\ibm\cognos\. Once this was removed and I restarted Excel with PAfE, in my case 2.0.67, all worked as expected.
------------------------------
George Tonkin
------------------------------
Original Message:
Sent: Tue July 27, 2021 02:42 AM
From: Siew Ho
Subject: PAX API
Hi, Sorry it took a while, I have tried removing the brackets, the error persist.
I installed IBM_PAfE_x86_2.0.65.11
Thanks for your assistance
------------------------------
Siew Ho
Original Message:
Sent: Mon July 26, 2021 04:03 PM
From: Ted Phillips
Subject: PAX API
original failure here sounded like was not able to get the reporting object (as if PA for Excel was not installed/active)?
not sure where things stand now, can you also describe the runtime environment? (using both Cognos for MS Office and PA for Excel, which versions, etc)
Thanks,
--
Ted
------------------------------
Ted Phillips
Original Message:
Sent: Thu July 15, 2021 11:48 PM
From: Siew Ho
Subject: PAX API
Hi,
I was following the YouTube tutorial to set up PAX and to use the exploration. I followed the steps to setup in PAx API
Ibm |
remove preview |
|
PAx API |
Using an application programming interface (API), you can automate the refreshing or publishing of content. You can use the API to create a scheduled batch program to refresh content on a daily, weekly, or monthly basis so that, as your period data changes, the affected files are kept up-to-date. |
View this on Ibm > |
|
|
I then followed the youtube tutorial in the user guide Add and execute IBM Cognos automation API functions
YouTube |
remove preview |
|
Add and execute IBM Cognos automation API functions |
In this video, you'll learn how to add and execute IBM Cognos automation API functions in IBM Planning Analytics for Microsoft Excel. |
View this on YouTube > |
|
|
However when I tried to run the Macro, I received "The given key was not present in the dictionary." error and the details "
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Cognos.Office.Framework.Automation.AutomationServer.Application(String plugin, String version)"
THe line of code I had was:
Public Sub Create()
Reporting.Explorations.Create ["http://test.tech", "24Retail","Revenue", "Compare"]
End Sub
Thanks for your help
------------------------------
Siew Ho
------------------------------
#PlanningAnalyticswithWatson