1

I am looking for advice on methodology here I guess.

I have an excel spreadsheet with areas which require a dynamic number of rows to be inserted, which is followed by fixed areas which require data to be added to specific col/row fields.

I want to load an existing spreadsheet for this due to the sheet having lots of styles applied.

Can this be done in PHPExcel?

I know PHPExcel can do dynamic insertion of rows in a new sheet, and can insert data into specific cells on an existing sheet, but can it handle both?

Ben Hull
  • 157
  • 8

1 Answers1

0

Ok, looks like this can be achieved with a little method called...

insertNewRowBefore

Example

$objPHPExcel->getActiveSheet()->insertNewRowBefore(7, 2);

With this, one can insert additional rows in-between content, dynamically.

Ben Hull
  • 157
  • 8