Initially all cells in worksheet are locked. Then, I unlock all the cells and try to lock only some of the cells.
$spreadsheet->getActiveSheet()->getStyle('A1')->getLocked()->applyFromArray(
[
'locked' => TRUE,
'hidden' => FALSE
]);
But, end up with this error.
Uncaught Error: Call to undefined method PhpOffice\PhpSpreadsheet\Style\Style::getLocked()
Thanks in advance.