@@ 383-394 (lines=12) @@ | ||
380 | $highestRow = $pSheet->getHighestRow(); |
|
381 | ||
382 | // 1. Clear column strips if we are removing columns |
|
383 | if ($pNumCols < 0 && $beforeColumnIndex - 2 + $pNumCols > 0) { |
|
384 | for ($i = 1; $i <= $highestRow - 1; ++$i) { |
|
385 | for ($j = $beforeColumnIndex - 1 + $pNumCols; $j <= $beforeColumnIndex - 2; ++$j) { |
|
386 | $coordinate = Coordinate::stringFromColumnIndex($j + 1) . $i; |
|
387 | $pSheet->removeConditionalStyles($coordinate); |
|
388 | if ($pSheet->cellExists($coordinate)) { |
|
389 | $pSheet->getCell($coordinate)->setValueExplicit('', DataType::TYPE_NULL); |
|
390 | $pSheet->getCell($coordinate)->setXfIndex(0); |
|
391 | } |
|
392 | } |
|
393 | } |
|
394 | } |
|
395 | ||
396 | // 2. Clear row strips if we are removing rows |
|
397 | if ($pNumRows < 0 && $beforeRow - 1 + $pNumRows > 0) { |
|
@@ 397-408 (lines=12) @@ | ||
394 | } |
|
395 | ||
396 | // 2. Clear row strips if we are removing rows |
|
397 | if ($pNumRows < 0 && $beforeRow - 1 + $pNumRows > 0) { |
|
398 | for ($i = $beforeColumnIndex - 1; $i <= Coordinate::columnIndexFromString($highestColumn) - 1; ++$i) { |
|
399 | for ($j = $beforeRow + $pNumRows; $j <= $beforeRow - 1; ++$j) { |
|
400 | $coordinate = Coordinate::stringFromColumnIndex($i + 1) . $j; |
|
401 | $pSheet->removeConditionalStyles($coordinate); |
|
402 | if ($pSheet->cellExists($coordinate)) { |
|
403 | $pSheet->getCell($coordinate)->setValueExplicit('', DataType::TYPE_NULL); |
|
404 | $pSheet->getCell($coordinate)->setXfIndex(0); |
|
405 | } |
|
406 | } |
|
407 | } |
|
408 | } |
|
409 | ||
410 | // Loop through cells, bottom-up, and change cell coordinate |
|
411 | if ($remove) { |