Skip to content

Broken cell cache / incorrect rows deletion #868

Closed
@AlexPravdin

Description

This is:

- [X] a bug report
<?php

require __DIR__ . '/vendor/autoload.php';

$workbook = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
$sheet = $workbook->getActiveSheet();
$sheet->getCell('A3')->setValue('A3');
$sheet->getCell('C1')->setValue('C1');
$sheet->removeRow(1, 2);
echo $workbook->getActiveSheet()->getCell('A1')->getValue(), "\n";
echo $workbook->getActiveSheet()->getCell('C1')->getValue(), "\n";

What is the expected behavior?

Script should output

A3

Value C1 must be deleted within the row. Value A3 moved to the first row as previous rows were deleted.

What is the current behavior?

A3
C1

The C1 value remain while its row was deleted.

Which versions of PhpSpreadsheet and PHP are affected?

PhpSpreadsheet 1.6.0
PHP 7.3.1

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions