$reader = ReaderFactory::create(Type::XLSX);
$reader->open('path/to/file/to/read.xlsx');
$writer = WriterFactory::create(Type::XLSX);
$writer->openToFile('path/to/file/to/write.xlsx');
while ($reader->hasNextSheet()) {
    $reader->nextSheet();
    while ($reader->hasNextRow()) {
        $row = $reader->nextRow();
        // change the row here if needed
        $writer->addRow($row);
    }
}

$reader->close();
$writer->close();

// And at the end, you can replace the old file with the new one:
rename('path/to/file/to/read.xlsx', 'path/to/file/to/write.xlsx');