Can any one tell me , why I’m not getting .CopytoDatatable at the end of this query?
Sometimes even after getting .copytodatatable, i get an error saying that “Object reference is not set”, why?
(From x In Dt1 Join y In dT2 On x(“NotOnUsCheck”).toString Equals y(“NotOnUsCheck”).toString Select ResultDT.LoadDataRow(New Object(){x(“CashIn”).toString,y(“NotOnUsCheck”).toString},False))
May be that time no rows were return, always in a if activity check the count of this query and inside that you can use assign to get the actual results.
I’m comparing one column of sheet1 and one column of sheet2, if they are equal then copy some columns of sheet1 and sheet2, write them in the sheet3 of same excel.