TM1_API2HAN Lib "tm1.xll" not loaded

Post Reply
User avatar
macsir
MVP
Posts: 782
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

TM1_API2HAN Lib "tm1.xll" not loaded

Post by macsir »

Hi, There

I am trying to use the following code

Code: Select all

Declare Function TM1_API2HAN Lib "tm1.xll" () As Long
in the module of my VS2010 VB.net application.
Compiling is successful but when executing to

Code: Select all

 getUserHandle = TM1_API2HAN()
it is saying tm1.xll can't be loaded.
This code is originally used in VBA and can be run successfully. Not sure how I can convert it into VB.net to load and use it correctly?
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: TM1_API2HAN Lib "tm1.xll" not loaded

Post by Alan Kirk »

macsir wrote:Hi, There

I am trying to use the following code

Code: Select all

Declare Function TM1_API2HAN Lib "tm1.xll" () As Long
in the module of my VS2010 VB.net application.
Compiling is successful but when executing to

Code: Select all

 getUserHandle = TM1_API2HAN()
it is saying tm1.xll can't be loaded.
This code is originally used in VBA and can be run successfully. Not sure how I can convert it into VB.net to load and use it correctly?
You can't. TM1_API2HAN is ONLY for use with the Excel add-in and piggy-backs off the login that the user has made through the Excel interface. For VB.Net you use the full method for connecting to the server.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
kavitha2002
Community Contributor
Posts: 180
Joined: Sat May 05, 2018 11:48 am
OLAP Product: tm1
Version: 10.3.10100.8
Excel Version: 14

Re: TM1_API2HAN Lib "tm1.xll" not loaded

Post by kavitha2002 »

Hi Alan,

I am new to TM1 and IBM cognos.

I am also facing the same issue with "TM1_API2HAN Lib "tm1.xll" not loaded". I am using vb.net project with excel integrated and application starting with tm1p.xla add-in.

Using Tm1 CAM security SSO enabled environment. I want to connect to TM1 perspectives using N_CONNECT_CAM. Previously using N_CONNECT for tm1 IntegratedSecuritymode=1

I have referred the link below from IBM, and converted the vba to vb.net code. So facing the tm1.xll not loaded problem.
http://www-01.ibm.com/support/docview.w ... wg21959177

Is there any other way to open TM1 perspectives from VB.net app. Kindly suggest me. Thanks
Post Reply