As I wrote, you adapted the limit necessary: If a normal use can produce 5000 records, you fixed the limit to 5000 (or slightly more) the purpose is to avoid that a jokester arranges to have a full table dump so that you do not want.
If this is not a problem, you delete the limit, but in this case, I strongly advise you to test an extreme case to make sure that the configuration accepts it.
You're right. I try with 3.800 rows of 5 columns, I haven't tried with my real data with 56.000 + rows of at least 12 columns yet. I wish it won't be useless at the end. Better to try right now before developing more.
For the range, you do you ask not the right question... Can you know the last line? Yes, it's $Line - 1 except if no record has been found.
Don't laugh at me :) but I changed to
//Setting Time Format of Column F
$objPHPExcel->getActiveSheet()
->getStyle('F2':.$Line -1)
->getNumberFormat()->setFormatCode('dd.mm.yyyy');
Of course it failed. It may involve writing a function but you spared a lot of time for me already and helped me unbelieveably. So I don't want to bother you more.