QTP Error - The retrieve DataTable.Value operation failed. The <Col1> Column does not exist.



One user getting the below error:

Error - The retrieve DataTable.Value operation failed. The <Col1> Column does not exist.


If the QTP is opened and run the code, no issues noticed. once the execution is completed after if re-execute using the same QTP session user getting above error.


If user close session every time and reopen before execution then no issues, means user should close and open QTP each time.


This is not an issue with QTP / Script, because once QTP is opened first time it will execute without any issues.

It is not issue related any settings, because within the execution the same script will execute no of times (iterations) based on input data from data table.


If reinstall QTP, couple of days (3-5days) we usually didn't notcie any issue which means, we tried by reinstalling QTP, the first couple of days no issues and after 3-5 days these kind of new issues we are noticed.

We tried by replacing machine also, but no luck.


Have monitored RAM usage (using task manger), space is sufficient and didn't reach the utilitzation upto 100%.


Note: Other users are able to continue with same script with out any issues.


Please let us know if any user notice this kind of issues.




Parents Reply Children
  • Hi Shanmugavel,


    Did you tried to debug when that error thrown?

    The error is occuring in normal execution method, and even Debug mode.


    Did you confirmed that the QTP datatable contains that column in the corresponding sheet?

    As i mentioned in my question, the same script with same excel is running first time and if we re-execute the same script with same excel is throwing an error as mentioned above.

    Have verified, data table is loaded and we are able to see loaded data table and Column as well.

    Once the error occured closed QTP and reopen, and then user able to execute the same script with same file without any issues.


    User got replaced with new machine, in new machine user able to execute the same scrip with same file around one week without any issues. And then user is getting different issues.






  • Hello Subbarao,,


    Try to change the QTP Remote Agent settings (you can find it right bottom corner of your desktop) and then give a try.



  • Hi Subbarao,


    issue seems to be very strange...


    try to dig more in debugging,


    • before that step in the script,  add few steps to print all Column names present in that sheet, like below


    columncount= dtsheet.getcolumncount  '---- this code is just to explain the logic
    for i=1 to columncount
    print dtsheet.getparameter(i).Name


    • so it will print all the names of the columns before that step, 
    • run the script for 2 times without closing the QTP/UFT
    • Compare column names between both the runs




    If you find this useful, mark Kudos.







  • Subbarao,


    The issue is most likely with your datasheet. The DataTable isn't the same as Excel and so it doesn't like some Formulas/Formatting. The error might occur after you have loaded /accessed a 'corrupt data sheet'.


    Check the data sheet for wrong formulas/formatting & remove them.