Forum Discussion
Hi Ravik
Does the textbox you are trying to type into have a max length? If TC detects that the string you are trying to enter is longer than the max length of the actual text box, that is the kind of message you get. Even if the textbox has a max length of 16, you may still run into an issue because...
TC uses the information supplied by Microsoft on the datatype it detected in the column - in other words, Microsoft guesses, TC believes it. This means a CSV field with 16 numbers in won't be interpreted as a text, but rather a number. This number is larger than an integer though, so ends up being changed to scientific notation e.g. 1.2345678901234E15 That value is interpreted as a string longer than 16 characters. Here two potential ways around this:
1. Use a XLS/XLSX file. That way you can add the single qoute in front of the number e.g. '1234567890123456 and TC will read it as a literal string. If you use source control this isn't the best option though. There is no way to compare the two files. If you are using spreadsheets as data, I would recommend sticking to CSV
2. Use a CSV in conjuction with schema.ini
Microsoft documentation on schema.ini
You need to place the file in the same folder as the CSV and it will override the way TC interprets it from Microsoft.
You should only need to specify the columns that don't behave, so in your case, you could have a CSV with 10 columns, but you only need to specify 2. So, for example:
[MyFile.csv] Format=CSVDelimited ColNameHeader=True MaxScanRows=5 Col9=NumberIn Text Col10=NumberOut Text
Hope that helps
Related Content
- 6 years agoSuperTester
Recent Discussions
- 3 days agovladd1