[ACCEPTED]-PhpExcel - How insert the same row after row N?-phpexcel

Accepted answer
Score: 18

Just copying what @markBaker said (so that 3 we can set the solution as an answer):

//Insert 10 new rows between rows 1 and 2 
$objPHPExcel->getActiveSheet()->insertNewRowBefore(2,10); 

Now 2 applying the style of the row 2 to the inserted 1 rows:

$objPHPExcel->getActiveSheet()->duplicateStyle($objPHPExcel->getActiveSheet()->getStyle('A1'),'A2:A10'); 

More Related questions