Contributor.. MarkK1 Contributor..
Contributor..
148 views

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?

0 Likes
6 Replies
Micro Focus Contributor
Micro Focus Contributor

Re: Data Import issue instead of column header creates P row

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.

0 Likes
Micro Focus Contributor
Micro Focus Contributor

Re: Data Import issue instead of column header creates P row

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

0 Likes
Contributor.. MarkK1 Contributor..
Contributor..

Re: Data Import issue instead of column header creates P row

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)


0 Likes
Micro Focus Contributor
Micro Focus Contributor

Re: Data Import issue instead of column header creates P row

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

 

Tags (1)
0 Likes
Contributor.. MarkK1 Contributor..
Contributor..

Re: Data Import issue instead of column header creates P row

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?
0 Likes
Micro Focus Contributor
Micro Focus Contributor

Re: Data Import issue instead of column header creates P row

I am from UFT R&D team in Microfocus, just sent mail to Dylan, asking for a escalation to R&D for further investigation.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.