Forum Discussion

Stacim's avatar
Stacim
New Contributor
7 years ago

Data loop file with leading zeros are dropping

I have a .csv file for a data loop with some leading zeros.  The numbers are formatted as text but still Test Complete is dropping the leading zero.  I tried formatting it in Excel and in the file directly but each time TestComplete drops the leading zero.  How can I fix this?

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    In your CSV file, just to be sure, do you have your numbers wrapped in quotes?  Like

     

    Column1,Column2,Column3
    "001","My stuff","this stuff"
    "002","Other Stuff", "Their stuff"

    Explicitly wrapping in quotes might help.

     

     

    If that doesn't fix it, could you post the code you're executing? There may be an implicit conversion going on that is converting what you're reading in as a number instead of as a string.