Tm1 pax - IBM Cognos Office Automation outside VBA

Post Reply
kavitha2002
Posts: 94
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Tm1 pax - IBM Cognos Office Automation outside VBA

Post by kavitha2002 » Thu Oct 11, 2018 6:19 am

Hello Everyone,

I would like to call the APIs for Pax outside VBA. Refer the below link
Want to do the same in vb.net. But not clear what is "To use IBM Cognos Office Automation outside VBA, you must create wrapper macros in the Microsoft Office document for each API. You can then call these macros from your code." in the above link. Not clearly understood. Guide me how to implement this.

Any suggestions kindly get back.

Thanks.

bgregs
Posts: 37
Joined: Wed Sep 12, 2018 11:19 am
OLAP Product: TM1 / Planning Analytics
Version: 2.0
Excel Version: 2016

Re: Tm1 pax - IBM Cognos Office Automation outside VBA

Post by bgregs » Thu Oct 11, 2018 11:30 am

What exactly are you struggling with for the wrapper creation? There is a very clear example listed in the IBM documentation you provided. If there's a specific question about the code I'd be happy to help, but from my standpoint that example was very clear.

kavitha2002
Posts: 94
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Re: Tm1 pax - IBM Cognos Office Automation outside VBA

Post by kavitha2002 » Thu Oct 11, 2018 1:42 pm

I am using vb.net app for the handling excel objects and tm1 reports. So I though of rewriting the .bas file in vb.net and call the automationserver.logon() from vb.net.
My code in vb.net is excelobj.COMAddIns.Item("CognosOffice12.Connect").object.AutomationServer which should return Cognos.Office.Framework.Automation.AutomationServer object but gives the below exception

Exception as "Automatioserver available only on STA."

Post Reply