Hi,
So this sent me down a rabbit hole

Let me explain.
When I ran the import with your template, I saw the same error as you did, the 500 error. This was good news because it means I can check it further locally. On checking why it fails I noticed that the ID 10100007 come through as 10100007" and this caused it to fail. This fails because when we check if the ID exists, it expects a number but it is no longer a number due to the ". That made me go check your file and I did not see anything weird with the file. Looks perfectly fine to me. First I added a check in the code to check if the ID is a real number so it doesn't fail with a 500 error but with a friendly message and continues to the next row.
However it still bothered me that the first IDs come through as 10100005 and 10100006. Now 10100007 is the first record after the next batch starts. I also created a new file without the " around the numbers and that imported fine. The " still bothered me so I checked further. What I found is that when the next batch starts we set the start position and this start position was shifted by 1 character. That caused everything to move over by 1 character. This is why we see the " at the end of the number. That was the real reason for the error you see.
Please
load the attached patch file and that should resolve your issue.
Let me know how it goes.
Kind regards,
RolandD
=========================
If you use our extensions, please post a rating and a review at the
Joomla! Extension Directory