Ask a Question

Exception in Keyword testing with Data Base Table variable

Occasional Contributor

Exception in Keyword testing with Data Base Table variable



I am trying to compare excel data with desktop application. Passing inputs from my local excel. Created variable in project level and assigned related excel cells.

Test complete is throwing exception when i am passing 000 via excel.

Example: customer id is 00000088 . In the excel the field type is Text. 

Declared as below in test complete. 


Can you please help me how to make this test accept text type as input from excel.


Hello @bkrishna213 - 


What is the step in your test that is throwing the exception? Is it a checkpoint? Please show how it is configured.





Could you take a screenshot of the keyword test or code you are running that's failing? 

Occasional Contributor

The entire test is based on Property check point comparison.

And its a data driven loop keyword test. The comparison is passed for when excel cell data type is integer Ex: 8900000.

I converted to text local excel cell to text to accept 0's. When this cell hit test complete then exception is thrown.

Please check the attachment.

Thank you. 

Occasional Contributor

Step where entering customer id




Onscreen action for settext. Here CustomerId is the one which I am picking from excel.

Expected is this step need to enter 0000008 in edit field. But once the control comes here exception is thrown.




Excel is having below columns



Over the years I've been using TestComplete, I would run into this problem, and others, using Excel as a data source.  I was spending a lot of time trying to compensate for what are just innate properties of Excel itself.  When I switched to using .csv files for my data source, my test development got much easier.

Occasional Contributor

Thank you very much for the suggestion. I tried with CSV as input file. 

Once i converted my excel to CSV the fields which i formatted are text became normal cells in CSV file. Able to enter in my application but expected result is not different, because of incorrect customer id.


Is there anything i can do with the excel ?

I think it will be easier to fix the csv. Can we try one thing? What is the problem with the customer id?
Occasional Contributor

The customer id is 8 digit. If it is starting with 00 or 000 like 00081111 in csv file it is showing as 81111. First 000's are not accepting in CSV.

Which results entering non customer id in the application.

Expectation is my csv should accept 000's in the customer id and same need to input in application.

Worst case scenario we could import a cell as a variable, and use a script to change it to a String. After that, slice the string and add 000 to the prefix.

I think there should be a better way but that's an option 🙂 

Showing results for 
Search instead for 
Did you mean: