Forum Discussion
TanyaYatskovska
11 years agoSmartBear Alumni (Retired)
Hi Ravi,
Have you tried specifying the type for each column? Here is the code I specified in the Schema.ini file (I mentioned about it earlier):
[Test.csv]
Format=Delimited(,)
CharacterSet=ANSI
Col1=CurrentNumber Double Width 20
Col2=NewNumber Double Width 20
In TestComplete 9.31, I successfully executed the following sample code that reads data from a CSV file:
//JScript
function CSVDriverExample()
{
DDT.CSVDriver("Test.csv" );
while (! DDT.CurrentDriver.EOF())
{
Log.Message(aqConvert.VarToFloat(DDT.CurrentDriver.Value(0)));
Log.Message(DDT.CurrentDriver.Value(1));
DDT.CurrentDriver.Next();
}
DDT.CloseDriver(DDT.CurrentDriver.Name);
}
Related Content
- 6 years agoSuperTester
Recent Discussions
- 6 hours agodhundley