CAFE VBA/VBS automation - cannot log in to TM1 server

Post Reply
Posts: 15
Joined: Wed Sep 14, 2016 9:26 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

CAFE VBA/VBS automation - cannot log in to TM1 server

Post by daniel.havassy » Fri Jun 02, 2017 12:12 pm

Hi Everyone,

I'd like to ask for some help regarding a CAFE VB automation issue.

What I'm trying to accomplish: After a data load, automatically refresh a CAFE Excel worksheet (it has two FlexViews) which I use for a post-load data quality check. I'd like to achieve this by executing a VB script file from the TI Epilog.

Issue: Logging in to the TM1 server from the script doesn't work, and so no further function is executed properly, although the Logon function returns True.

Further details: TM1 and CAFE 10.2.2. I have set up the CAFE automation using the samples in the CAFE installation directory's Automation folder.

Check below the relevant part of the code that I use. Any help is much appreciated.

Code: Select all

Set objWB = objExcel.Workbooks.Open("C:\some path\someFile.xlsm")


bSuccess = objExcel.Run("Logon", "http://server/ibmcognos/cgi-bin/cognos.cgi", "user", "pwd", "namespace")

If (bSuccess) Then

    objExcel.Run "ClearAllData"

    objExcel.Run "RefreshAllData"

    objExcel.Run "Logoff"


End If

Post Reply