Connecting excel vba to ALM 15

Hi All,

Am trying to load data into ALM 15 test plan using excel macro. So when establishing connection between excel vba and ALM 15 am getting error as "Activex component cannot create object" 429 .below is the code i used. Can you suggest me on how to establish the connection  between excel vba and ALM 15 (without SSO)

Set QCConnection = CreateObject (:"TDApiOle80.TDConnection")

QCConnection.InitConnectionEx "ALM url"

 

TIA

 

  • Two possible reasons:
    1. Did you register ALM client files? Go to Tools page -> ALM Client Registration -> Register ALM to perform registration.
    2 Did you run the script in 64 bit Excel? If yes, you need to update registration information accordingly. Below thread can be referred.
    https://community.microfocus.com/t5/ALM-QC-User-Discussions/Workaround-OTA-amp-64-Bit-Applications-Excel-Word-etc/m-p/1639028
    Good luck!


  • Looks below statement has incorrect :
    Remove : from below statement:

    Set QCConnection = CreateObject (:"TDApiOle80.TDConnection")

    It should be like
    Set QCConnection = CreateObject ("TDApiOle80.TDConnection")
  • Same error, after correcting statement

  • If you are using SSO authentication in ALM 15, you should use API key to authenticate. So the format will be as below. 

     

     

    QCConnection.InitConnectionWithApiKey server, appkey, appSecret QCConnection.Connect strDomain, strProject Note:"Any paramters in above format can be changed as per your preference but expect InitConnectionWithApiKey". You can also use 'InitConnectionWithApiKeyEx' instead of InitConnectionWithApiKey.

     

     

     

    In any cases make sure you registered ALM Desktop client and Site Admin.  If already registered, deleted "temp" or "TD" folder and try again. 

    Note: If you register ALM Desktop Client or Site Admin while EXCEL sheet was OPENED, you will fail to execute OTA script from excel. So, you would have to close excel sheet and reopen the excel sheet that you want to execute OTA script.  Also I wont do  "ALM url", instead I would do as ALMurl. which is as below 

    Dim QcConnection As Object
    Dim ALMurl As String

    Set QcConnection = CreateObject("TDApiOle80.TDConnection.1") 

    'or 

    'Set QcConnection = CreateObject("TDApiOle80.TDConnection") 

    QcConnection.InitConnectionEx ALMurl

     

     

  • I just read your statement. So you are not using SSO. 

    Try to follow my above 2nd Note. 

    Also you can use as

    Set QcConnection = CreateObject("TDApiOle80.TDConnection.1")
  • I am also getting the same error. when i run the following code .  After Set QCConnection line , it is getting into error flow.

    I have done the ALM registration as well. Any help ??

    Sub ConnectTo_QC()
    'TDConnection object.
    On Error GoTo QCConnErr
    Set QCConnection = CreateObject("TDApiOle80.TDConnection")

    'Connect to QC server
    QCConnection.InitConnectionEx QCPath


    'Login details
    On Error GoTo QCLoginErr
    QCConnection.login UserId, Password

    On Error GoTo ProjConnErr
    'Default = Domain, QualityCenter_Demo = Project
    QCConnection.Connect QCDomain, QCProject
    LogMessage "Connection to QC - Successful."

    Exit Sub
    'Error handling
    QCConnErr:
    LogMessage "Connection to QC - Failed."
    theQCConnectError = True