You can get the data last row using
=max(arrayformula((--(A:A<>"")*row(A:A))))
or
=max(iferror(arrayformula(arrayformula((--(importrange("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "'Sheet1'!A:A")<>""))) * arrayformula(row(A:A))),0))
This might not directly answer your question, though.