Results 1 to 3 of 3
  1. #1

    Quality Center files integration with QTP

    HI All,
    I have little bit confusion over integrating excelsheet(which is in Quality Center) with QTP.
    Any one can guide me in this regard.

    EX: I have InputData folder in QC.In that folder I have Input excelsheet. The same i wanted to import into QTP on run time by writing like this "DataTable.Importsheet"[Quality Center] InputData\Input.xls"
    I don't know what is wrong with this.Excelsheet is not importing into QTP data table in runtime.

    Thanks & Regards,

  2. #2

    Re: Quality Center files integration with QTP

    Hi Chandrasekharo,

    To import a sheet from QC to QTP use the below function:

    Function LoadResources (pAttFilename,pAttFolder)
    On error resume next
    Set Qc = QCUtil.TDconnection
    Set tm = Qc.TreeManager
    Set root = tm.TreeRoot("Subject")
    Set Child1 = root.FindChildNode("<specify the folder name where the 'InputData' folder is created>")
    Set folder = Child1.FindChildNode(pAttFolder)
    Set fact = folder.Attachments
    Set alist = fact.NewList("")
    For Each att In alist
    Set ext = att.AttachmentStorage
    attname = att.DirectLink
    If InStr(attname, pattfilename) > 0 Then
    ext.Load attname, True
    Exit For
    End If
    LoadResources=""&ext.ClientPath & "\" &attname&""

    End Function

    DataTable.Addsheet("<Destination_sheetname>" )
    DataTable.Importsheet LoadResources("<Input.xls>","<InputData folder name where the excel is attached in QC>"), "<sheetname to be imported>", "<Destination_sheetname>"

    Please let me know if you have any questions.


  3. #3

    Re: Quality Center files integration with QTP

    Hi Vill,

    Sorry for the late reply.Thanks for the help.
    I tryed with above function it is working fine.




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
BetaSoft Inc.
All times are GMT -8. The time now is 05:59 PM.

Copyright BetaSoft Inc.