Data Import issue instead of column header creates P row

I have created a support ticket for this but still haven't heard back.

When a table is imported from Excel in version 14.5, the first Excel rows import as column headings in UFT.

In 15.0, they do not, the datatable has columns A, B, C, etc, and the headings import into a row labeled "P".

Therefore, my scripts fail "The retrieve DataTable.value operation failed.  The <Policy> column does not exist."

Is there a setting I can make that will import the data the same way?

  • Hi Mark,

     

    You may find the changes recording the column and parameter names:

    https://admhelp.microfocus.com/uft/en/15.0/UFT_Help/Content/User_Guide/Define_DT_Task.htm#mt-item-4

     

    Despite those changes in 15.0, there should be no impact on ImportSheet method, could you please show me the scripts and I will take a look if there's a defect or known issue here, thanks.

  • Also please let me know the case number you raised, I will try to ask support engineer response ASAP, thanks.

  • The support number is SD02631194.
    I got a reply from him and have a question back for Dylan.
    My reply is:
    Hello Dylan, below is some example code of what gets passed in from our driver spreadsheet. Would this row need to change to get it to work in 15.0? Browser("INGENIUM 6.5.0 QAS").Page("INGENIUM 6.5.0 QAS").Frame("Frame").WebEdit("MIR-POL-ID-BASE").Set DataTable("Policy", dtGlobalSheet)



    Dim rownum,filelocation,sheetname
    rownum = Parameter("inputrow")
    filelocation = Parameter("filelocation")
    sheetname = Parameter("sheetname")
    DataTable.ImportSheet filelocation ,sheetname ,1 'file will be exported to the Global sheet

    DataTable.SetCurrentRow(rownum)

    Browser("INGENIUM 6.5.0 QAS").Page("INGENIUM 6.5.0 QAS").Frame("menuserverFrame").WebElement("Major Policy Change").Click
    Browser("INGENIUM 6.5.0 QAS").Page("INGENIUM 6.5.0 QAS").Frame("menuserverFrame").Link("Redo Processing").Click
    Browser("INGENIUM 6.5.0 QAS").Page("INGENIUM 6.5.0 QAS").Frame("Frame").WebEdit("MIR-POL-ID-BASE").Set DataTable("Policy", dtGlobalSheet)


  • Hi Mark,

    I've tried below script without problem:

    DataTable.ImportSheet "c:\demo.xlsx", "sheet1",1 
    DataTable.SetCurrentRow(1)
    msgbox DataTable("Policy", dtGlobalSheet)

    Meanwhile I checked the snapshots from that case, there're several external actions loaded in the test, it might be the root cause by my guess.

    Could you please share the entire test with the external actions for us to take a look? You could simplify it by removing some content if there are sensitive data inside, thanks.

    BR,

    Lancer

     

  • Hi, I made an updated reply to the Request at Micro Focus.
    Do you work with Dylan Alfaro, or are you outside of Micro Focus?
  • I am from UFT R&D team in Microfocus, just sent mail to Dylan, asking for a escalation to R&D for further investigation.