Hello all!
There is a problem when trying to iterate over a dynamic chosen Excel file.
The flow runs once a week.
The scenario is that there is a folder A which all it's files will be deleted first.
After that, an specific Excel file "test.xlsx" will be copied into this folder.
Then, the Excel file will be read in the form of created batches of 5000 rows each.
The idea of resizing the large Excel file into smaller chuncks is originally related to this post:
Re: When an Excel row is created, modified, or del... - Power Platform Community (microsoft.com)^
My flow acts on a scheduled automation. The original post is related to "When an item or file is modified".
Flow build:

Flow logic:

Length function:
length(outputs('List_rows_to_get_count_-_Temp')?['body/value'])
Mul function:
mul(15000, iterationIndexes('Do_until_Get_row_count_for_batches'))
Range function:
range(0, div(actions('List_rows_to_get_count_-_Temp')['inputs']['parameters']['$skip'], 5000))
Mul function:
mul(5000, items('Apply_to_each_Get_all_rows_in_batches'))
As you see, the idea is to portion the large Excel file into batches of 5000 rows each.
Error:
The cause of the error message is that the "item was not found" for the first batch.
The other two batches work fine!.

The flow works perfectly fine for a static file.
I tried a lot of different approaches but can not figure out what the cause of the failed first item for the dynamic chosen file is.
Many thanks!
Best regards,
VDG