removeRow problem with merged cells

Topics: Developer Forum, User Forum
Jun 8, 2011 at 1:44 PM
Edited Jun 8, 2011 at 1:46 PM

Hello,

I'm trying to remove some rows with merged cells and i can't get it right.

It looks like merged cells don't get removed (I know merged cells are in separated array).

I can post some of my PHP code if needed. I'm using Excel2007 for reading and writing and PHPExcel 1.7.6

 

Thanks

Jun 8, 2011 at 1:59 PM

OK, here is how it looks like:

I try to remove first two rows with:

$objPHPExcel->getActiveSheet()->removeRow(1,2);

After removing i get this:

Jun 8, 2011 at 3:34 PM

I found a quick solution. Just removing one row at a time is working fine.

$objPHPExcel->getActiveSheet()->removeRow(1,1);

$objPHPExcel->getActiveSheet()->removeRow(1,1);

instead of

$objPHPExcel->getActiveSheet()->removeRow(1,2);