Forum Discussion
Hi,
I am reading the values from .csv file and comparing the values.
.csv file:-
MBA-Login Pass 9 0
Createtc Pass 13 0
LogOff Fail 4 1
Code:-
fso = new ActiveXObject( "Scripting.FileSystemObject" );
fin = fso.OpenTextFile( src, forReading );
fout = fso.OpenTextFile( dest, forWriting, true );
// create file if not found
// Write out header and start of table
fout.WriteLine( htmlHeader() );
fout.WriteLine( "<pre><h1>Test Results</b></h1>\n" );
while( !fin.AtEndOfStream )
{
var line = fin.ReadLine();
if( line == "" )
continue;
data = line.split( "\t" );
++tcount;
if(data[1]==”Pass”)
++pcount;
else
++fcount;
}
For taking the Pass , Fail Count am comparing the values data[1]. Data[1] contain the right value (Pass,Pass,Fail). Comparison is not happening properly. Always its giving the pcount as “0” and fcount as “0” (displaying the initialized value).
I have tried with eval and aqconvert(VarToStr).
Please suggest any other solution for the above mention problem.
Thanks,
Lakshmi Priya