Box\Spout\Reader\XLSX\Helper\StyleHelper::getNumberFormatCode PHP Method

getNumberFormatCode() public method

NOTE: It is assumed that the style DOES have a number format associated to it.
public getNumberFormatCode ( integer $styleId ) : string
$styleId integer Zero-based style ID
return string The number format code associated with the given style
    public function getNumberFormatCode($styleId)
    {
        $stylesAttributes = $this->getStylesAttributes();
        $styleAttributes = $stylesAttributes[$styleId];
        $numFmtId = $styleAttributes[self::XML_ATTRIBUTE_NUM_FMT_ID];
        if ($this->isNumFmtIdBuiltInDateFormat($numFmtId)) {
            $numberFormatCode = self::$builtinNumFmtIdToNumFormatMapping[$numFmtId];
        } else {
            $customNumberFormats = $this->getCustomNumberFormats();
            $numberFormatCode = $customNumberFormats[$numFmtId];
        }
        return $numberFormatCode;
    }