Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/NumberFormat.php
public function applyFromArray(array $pStyles)
    {
        if ($this->isSupervisor) {
            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles));
        } else {
            if (isset($pStyles['formatCode'])) {
                $this->setFormatCode($pStyles['formatCode']);
            }
        }

        return $this;
    }
public function applyFromArray(array $pStyles)
    {
        if ($this->isSupervisor) {
            $this->getActiveSheet()->getStyle($this->getSelectedCells())->applyFromArray($this->getStyleArray($pStyles));
        } else {
            if (isset($pStyles['formatCode'])) {
                $this->setFormatCode($pStyles['formatCode']);
            }
        }

        return $this;
    }
Apply styles from array.

<code>
$spreadsheet->getActiveSheet()->getStyle('B2')->getNumberFormat()->applyFromArray(
[
'formatCode' => NumberFormat::FORMAT_CURRENCY_EUR_SIMPLE
]
);
</code>

@param array $pStyles Array containing style information

@throws PhpSpreadsheetException

@return NumberFormat