<?php
//load spreadsheet
$spreadsheet = PhpOfficePhpSpreadsheetIOFactory::load("yourspreadsheet.xlsx");
//change it
$sheet = $spreadsheet->getActiveSheet();
$sheet->setCellValue('A1', 'New Value');
//write it again to Filesystem with the same name (=replace)
$writer = new Xlsx($spreadsheet);
$writer->save('yourspreadsheet.xlsx');