XLSXWriter::determineCellType PHP 메소드

determineCellType() 개인적인 메소드

private determineCellType ( $cell_format )
    private function determineCellType($cell_format)
    {
        $cell_format = str_replace("[RED]", "", $cell_format);
        if ($cell_format == 'GENERAL') {
            return 'string';
        }
        if ($cell_format == '0') {
            return 'numeric';
        }
        if (preg_match("/[H]{1,2}:[M]{1,2}/", $cell_format)) {
            return 'datetime';
        }
        if (preg_match("/[M]{1,2}:[S]{1,2}/", $cell_format)) {
            return 'datetime';
        }
        if (preg_match("/[YY]{2,4}/", $cell_format)) {
            return 'date';
        }
        if (preg_match("/[D]{1,2}/", $cell_format)) {
            return 'date';
        }
        if (preg_match("/[M]{1,2}/", $cell_format)) {
            return 'date';
        }
        if (preg_match("/\$/", $cell_format)) {
            return 'currency';
        }
        if (preg_match("/%/", $cell_format)) {
            return 'percent';
        }
        if (preg_match("/0/", $cell_format)) {
            return 'numeric';
        }
        return 'string';
    }