Forum Discussion

wynfranc1234's avatar
wynfranc1234
Contributor
11 years ago

String format specifier & missing commas from an Excel field.

I used excel as my input in my test. The format of my field called Amount has commas in it. e.g.    1,500.50



When it was loaded to Testcomplete, as part of data driven test, the comma disappears in the field. It is fine for CSV though.



 How do I retain the format of the field to not remove the commas from an excel s/s? I'm also using Jscript. How do i format a string to include commas for a number?



Thanks.

2 Replies

  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3
    Try making sure that your Excel sheet is formatted as text.  All my data comes over in the format I want when I do it that way.
  • Thanks! I've upgraded to TC 10.2 and TC is now showing the right format from excel. Don't have to change the type of the field. I think it was a bug from a previous version. Thanks anyway!