DataTable formatting problem with UFT
Question ID: 110003

This ‘issue’ started with version 15.0.1 with the enhancements made to the uft data tables. I will do my best to describe the behavior. It is probably easiest to use an example.

Example: We have a date, 01/01/2021, that was captured from the screen and want to write it to a UFT data table. The value actually is saved as ‘1/1/2021’. That is a problem because we need to verify/use the date in the same format of the original value after being re-read from the data table. So, a work around is to put a single quote in front of the value ’01/01/2021 so that it is interpreted as text just like Excel does. Same thing would happen to a numeric value 01234 would be saved by the default formatting of the cell as 1234. By putting single quote the value would be interpreted by the cell as 01234, the single quote is not visible.

So, the work around works, however, there are times that we import an Excel spreadsheet into UFT then write captured/calculated values to the data table that was created during the import process. The cell format in UFT will be whatever it was in Excel. So, if the cell formatting was set to Text, then if I use the single quote to denote the value should be saved/interpreted as text the single quote actually appears in the cell. That causes an issue because the single quote isn’t expected.

Hopefully all of that makes sense.

I have searched the internet and have not found a way to set formatting of the UFT data table cells or at least find out what the format is during runtime. So, my question is do you know if there is a way to specify the format of the cells in a UFT runtime data table or at least find out what it is during runtime?

Marked as spam
Posted by (Questions: 227, Answers: 22)
Asked on January 27, 2021 2:31 pm
Answers (1)
Private answer

Are you not able to right-click on the column in the data table and format the date as 'mm/dd/yyyy'?

Is this value in the data table being populated automatically during the script run, or is this a static value in the data table?

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on January 27, 2021 2:31 pm

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

Scroll to Top