You cant get the rowcount because, In "getdtvalue" method you are importing the data, whereas you are trying to find our the rowcount before it is called.
Move ImportSheet method(and corresponding steps) from the function and put it before the getrowcount method. You should be good to go.
Regards,
Uday
Move ImportSheet method(and corresponding steps) from the function and put it before the getrowcount method. You should be good to go.
Regards,
Uday