This article has been translated.
insertNewRowBefore is expensive to process.
I think it would be faster if you could leave the formula and format fixed when inserting a row instead of adjusting them.
Isn't there a way like that?
$spreadsheet->getActiveSheet()->insertNewRowBefore(7, 2);