I've never worked with that application, but have you considered just letting it fail on the index after the last one? If it fails quickly, then it might be an option. Assuming it's zero-index based and there are 10 rows, when you attempt to read index 10 (row 11), application modeller wouldn't find an element there and would throw an error. This would work no matter how many rows there are. You catch the error in a block using a recover stage, use a decision stage to verify the ExceptionDetail() text indicates the error has to do with the element/index not existing, and then resume the error (clear it).
------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------
Dave Morris, 3Ci at Southern Company