This is:
What is the expected behavior?
not throwing an Exception ?
What is the current behavior?
[Exception]
HTTP 500 Internal Server Error
Your requested sheet index: -1 is out of bounds. The actual number of sheets is 1.
What are the steps to reproduce?
$mySpreadsheet = new Spreadsheet();
$mySpreadsheet->removeSheetByIndex(0);
$worksheet = new Worksheet($mySpreadsheet, 'Insured List');
$mySpreadsheet->addSheet($worksheet, 0);
$row = 1;
$col = 1;
$worksheet->getCell([$col, $row])->setValue('id_uti');
What features do you think are causing the issue
Which versions of PhpSpreadsheet and PHP are affected?
PhpSpreadsheet 2.2 / PHP 8.3