0

My XLS sheet has 790527915 stored as text format.

My Data Source table shows the number (790527915) stored as text, though I import the Excel sheet every time I run it with the new test data..

At run-time, when I "GetValue" from the data source (below), I get "7.90528e+008" as a string text.

    string paramValue;
    paramValue = GetDataSource(dataSheetName).GetValue(templateRow,paramName).ToString();

I'm sure it's something stupid. I didn't have this problem in QTP, but this API Test side of UFT is driving me crazy!

--Jan

Jan D
  • 51
  • 3
  • 1
    Add a single quote `'790527915 ` in your data. – Barney Mar 05 '17 at 13:51
  • There are 10,000 cells, and a few hundred datasheets. Editing them all would be costly to the customer. Maybe I can convert it to integer and then convert it back to text. – Jan D Mar 05 '17 at 19:33
  • FTW - Each cell is text formatted in Excel to be text, including the date cells, which do come in as text format. And, that solved the problem for QTP, just not this API tool. :( – Jan D Mar 05 '17 at 19:35
  • How are you importing your Excel sheet to UFT? Because I have load the Excel file using [**`this`**](http://stackoverflow.com/a/37706073/1652222) technique and UFT reads data properly. – ManishChristian Mar 06 '17 at 19:26

0 Answers0