function write($row, $col, $token, $format = null)
    {
        // Check for a cell reference in A1 notation and substitute row and column
        /*if ($_[0] =~ /^\D/) {
            @_ = $this->_substituteCellref(@_);
    }*/

        if (preg_match("/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/", $token)) {
            // Match number
            return $this->writeNumber($row, $col, $token, $format);
        } elseif (preg_match("/^[fh]tt?p:\/\//", $token)) {
            // Match http or ftp URL
            return $this->writeUrl($row, $col, $token, '', $format);
        } elseif (preg_match("/^mailto:/", $token)) {
            // Match mailto:
            return $this->writeUrl($row, $col, $token, '', $format);
        } elseif (preg_match("/^(?:in|ex)ternal:/", $token)) {
            // Match internal or external sheet link
            return $this->writeUrl($row, $col, $token, '', $format);
        } elseif (preg_match("/^=/", $token)) {
            // Match formula
            return $this->writeFormula($row, $col, $token, $format);
        } elseif ($token == '') {
            // Match blank
            return $this->writeBlank($row, $col, $format);
        } else {
            // Default: match string
            return $this->writeString($row, $col, $token, $format);
        }
    }
function write($row, $col, $token, $format = null)
    {
        // Check for a cell reference in A1 notation and substitute row and column
        /*if ($_[0] =~ /^\D/) {
            @_ = $this->_substituteCellref(@_);
    }*/

        if (preg_match("/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/", $token)) {
            // Match number
            return $this->writeNumber($row, $col, $token, $format);
        } elseif (preg_match("/^[fh]tt?p:\/\//", $token)) {
            // Match http or ftp URL
            return $this->writeUrl($row, $col, $token, '', $format);
        } elseif (preg_match("/^mailto:/", $token)) {
            // Match mailto:
            return $this->writeUrl($row, $col, $token, '', $format);
        } elseif (preg_match("/^(?:in|ex)ternal:/", $token)) {
            // Match internal or external sheet link
            return $this->writeUrl($row, $col, $token, '', $format);
        } elseif (preg_match("/^=/", $token)) {
            // Match formula
            return $this->writeFormula($row, $col, $token, $format);
        } elseif ($token == '') {
            // Match blank
            return $this->writeBlank($row, $col, $format);
        } else {
            // Default: match string
            return $this->writeString($row, $col, $token, $format);
        }
    }
function write ( $ row , $ col , $ token , $ format = null ) { // Check for a cell reference in A1 notation and substitute row and column
 /*if ($_[0] =~ /^\D/) {
            @_ = $this->_substituteCellref(@_);
    }*/ if ( preg_match ( "/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/" , $ token ) ) { // Match number
 return $ this -> writeNumber ( $ row , $ col , $ token , $ format ) ; } elseif ( preg_match ( "/^[fh]tt?p:\/\//" , $ token ) ) { // Match http or ftp URL
 return $ this -> writeUrl ( $ row , $ col , $ token , '' , $ format ) ; } elseif ( preg_match ( "/^mailto:/" , $ token ) ) { // Match mailto:
 return $ this -> writeUrl ( $ row , $ col , $ token , '' , $ format ) ; } elseif ( preg_match ( "/^(?:in|ex)ternal:/" , $ token ) ) { // Match internal or external sheet link
 return $ this -> writeUrl ( $ row , $ col , $ token , '' , $ format ) ; } elseif ( preg_match ( "/^=/" , $ token ) ) { // Match formula
 return $ this -> writeFormula ( $ row , $ col , $ token , $ format ) ; } elseif ( $ token == '' ) { // Match blank
 return $ this -> writeBlank ( $ row , $ col , $ format ) ; } else { // Default: match string
 return $ this -> writeString ( $ row , $ col , $ token , $ format ) ; } }
Map to the appropriate write method acording to the token recieved.

@access public
@param integer $row    The row of the cell we are writing to
@param integer $col    The column of the cell we are writing to
@param mixed   $token  What we are writing
@param mixed   $format The optional format to apply to the cell
Map to the appropriate write method acording to the token recieved .