Forum Discussion

Nbabutc's avatar
Nbabutc
Occasional Contributor
3 years ago

Reading from excel is not accurate

Hi,

I am traying to read from excel but it always showing wrong data, 

In this sheet, the selected rows 1,  

if its fetch 1 record then its should fetch the details of that one. but it is fetching 0 record selectd.

based on above value, these below detailed data should read.

I used these code for fetching data...

 

if (ObjLocalConn != null){
ObjRS = Sys["OleObject"]("ADODB.Recordset");
ObjRS["Open"](TableName, ObjLocalConn, 3, 1, 2)
ObjRS["MoveFirst"]();
IntRowLoop = 0
while(!ObjRS["EOF"])
{
strTableData = ObjRS["GetString"](2, -1, ":", "\r\n")

}
}

 

suppose if I select diff row, like

it fetch the record of select test case but while fetching detailed about that record 

and for these it is fetching below data but its wrong 

the actual data is:

 

I dont why it is reading wrong data..

 

 

 

  • ohhh actually, it was reading as a database rows,so now its is working 

    it defined as tables, 

     

  • Are the intended record and the fetched wrong record always off by 1 record?

  • Nbabutc's avatar
    Nbabutc
    Occasional Contributor

    ohhh actually, it was reading as a database rows,so now its is working 

    it defined as tables,