UFT DataTable | Data is being reformatted vs treated as a string.

  • KM03787375
  • 22-Feb-2021
  • 22-Feb-2021

This document has not been formally reviewed for accuracy and is provided "as is" for your convenience.

Summary

UFT One datable issues with reformatted entries

Reference

Issue:

After changes being made on the datatale for UFT 15 onwards some of our customers have reported below scenarios

  1.  When entering a large number, the data is converted to scientific notation vs treating it as a string

Example: DataTable.GlobalSheet.AddParameter "LargeNum", "123456789101112" becomes 1.234E+14

  1. Dates entered are getting reformatted vs treating it as a string.

DataTable.GlobalSheet.AddParameter "Date", "'01/01/21" becomes 1/1/2021

This both scenarios cannot be reproduced on UFT 14.53 and below versions, since the DataTable is another one.

 

Workarounds

  • One of the suggestions we commented about was about changing the entire data used by UFT to general number, so that UFT avoids changing the “123456789101112” number to a scientific number.
  • The other suggestion was to use an apostrophe (‘) in front of the date.

Both suggestions will work to see the entered data as a String however will implicit to update the scripts (if any) with these changes.

 

Solution/Fix

Since most of the time user will prefer to not edit their scripts because there are too many and will be impactful, R&D provided a temporary solution with below explanation.

We upgraded our data table to be compatible with latest excel capabilities.

As part of it, we aligned with Microsoft out of the box behavior. We still have the old version available for temporary customer usage (to enable it you have the guidelines below), but it is not recommended for long term for customers to use it, it is temporary workaround.

Change Type = 0 under HKEY_CURRENT_USER\SOFTWARE\Mercury Interactive\QuickTest Professional\MicTest\DataTable in registry. Then restart UFT.