Datatable parameter name including characters like space and dash

  • KM03645445
  • 27-May-2020
  • 27-May-2020

Summary

You can now use dashes (-) and spaces in the data table parameter names.

Error

In UFT 15.0 it was added a newly designed datatable to support extra characters like dashes and spaces:

What's new in UFT One 15.0
https://admhelp.microfocus.com/uft/en/15.0-15.0.1/UFT_Help/Content/WhatsNew/whats-new-15.0.htm#mt-item-3

new

Cause

This new design, can cause some issues when retrieving the values from the datables object in a UFT script for data in certain formats and script can fail because of that.

 

Fix

In 15.0.1 and newer versions, R&D has restored behavior to be aligned with previous UFT versions, in other words, it was removed the support for extra characters like dashes and spaces (to be the same as previous UFT versions prior to 15.0) and included a new parameter to enable the new behavior.
So in case there's a need to support extra characters, include "bNewParamNameFormat" parameter in Datatable.Importsheet method. For example:

DataTable.ImportSheet "UFT15DataTableTest2.xls", 1, "Test", True