Skip to content
This repository has been archived by the owner on Jan 2, 2019. It is now read-only.

Fixed formula/formatting bug when removing rows #70

Merged
merged 1 commit into from
Oct 28, 2012
Merged

Fixed formula/formatting bug when removing rows #70

merged 1 commit into from
Oct 28, 2012

Conversation

techhead
Copy link
Contributor

When columns were being added/removed, empty cells were being overwritten with blank cells that specified the default format, effectively overwriting the column format.

Also, when removing columns, there was an order-of-operation bug that caused some formulas to be rewritten incorrectly.

$cell = $pSheet->getCell($cellID);
$cellIndex = PHPExcel_Cell::columnIndexFromString($cell->getColumn());
if ($cellIndex-1 + $pNumCols < 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this new check to stay in bounds.

MarkBaker pushed a commit that referenced this pull request Oct 28, 2012
Fixed formula/formatting bug when removing rows
@MarkBaker MarkBaker merged commit d66f61b into PHPOffice:develop Oct 28, 2012
@MarkBaker
Copy link
Member

Thanks for the fix, very useful

@techhead
Copy link
Contributor Author

Thanks for the merge!

@Progi1984 Progi1984 added this to the 1.8.0 milestone Aug 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants