public function addPicture($picturePath, $pictureLocation, $upperLeftRow = 0, $upperLeftColumn = 0, $lowerRightRow = 0, $lowerRightColumn = 0)
    {
        if ($this->worksheetName == '') {
            throw new Exception('No Worksheet Specified');
        }
        if ($pictureLocation == 'Server' || $pictureLocation == 'server') {
            $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName . '/pictures?upperLeftRow=' .
                $upperLeftRow . '&upperLeftColumn=' . $upperLeftColumn .
                '&lowerRightRow=' . $lowerRightRow . '&lowerRightColumn=' . $lowerRightColumn .
                '&picturePath=' . $picturePath;
            $signedURI = Utils::sign($strURI);
            $responseStream = Utils::processCommand($signedURI, 'PUT');
        } else if ($pictureLocation == 'Local' || $pictureLocation == 'local') {
            if (!file_exists($picturePath)) {
                throw new Exception('File Does not Exists');
            }
            $stream = file_get_contents($picturePath);
            $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName . '/pictures?upperLeftRow=' .
                $upperLeftRow . '&upperLeftColumn=' . $upperLeftColumn .
                '&lowerRightRow=' . $lowerRightRow . '&lowerRightColumn=' . $lowerRightColumn .
                '&picturePath=' . $picturePath;
            $signedURI = Utils::sign($strURI);
            $responseStream = Utils::processCommand($signedURI, 'PUT', '', $stream);
        }
        $json = json_decode($responseStream);
        if ($json->Code == 200) {
            return true;
        } else {
            return false;
        }

    }
public function addPicture($picturePath, $pictureLocation, $upperLeftRow = 0, $upperLeftColumn = 0, $lowerRightRow = 0, $lowerRightColumn = 0)
    {
        if ($this->worksheetName == '') {
            throw new Exception('No Worksheet Specified');
        }
        if ($pictureLocation == 'Server' || $pictureLocation == 'server') {
            $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName . '/pictures?upperLeftRow=' .
                $upperLeftRow . '&upperLeftColumn=' . $upperLeftColumn .
                '&lowerRightRow=' . $lowerRightRow . '&lowerRightColumn=' . $lowerRightColumn .
                '&picturePath=' . $picturePath;
            $signedURI = Utils::sign($strURI);
            $responseStream = Utils::processCommand($signedURI, 'PUT');
        } else if ($pictureLocation == 'Local' || $pictureLocation == 'local') {
            if (!file_exists($picturePath)) {
                throw new Exception('File Does not Exists');
            }
            $stream = file_get_contents($picturePath);
            $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() . '/worksheets/' . $this->worksheetName . '/pictures?upperLeftRow=' .
                $upperLeftRow . '&upperLeftColumn=' . $upperLeftColumn .
                '&lowerRightRow=' . $lowerRightRow . '&lowerRightColumn=' . $lowerRightColumn .
                '&picturePath=' . $picturePath;
            $signedURI = Utils::sign($strURI);
            $responseStream = Utils::processCommand($signedURI, 'PUT', '', $stream);
        }
        $json = json_decode($responseStream);
        if ($json->Code == 200) {
            return true;
        } else {
            return false;
        }

    }
public function addPicture ( $ picturePath , $ pictureLocation , $ upperLeftRow = 0 , $ upperLeftColumn = 0 , $ lowerRightRow = 0 , $ lowerRightColumn = 0 ) { if ( $ this -> worksheetName == '' ) { throw new Exception ( 'No Worksheet Specified' ) ; } if ( $ pictureLocation == 'Server' || $ pictureLocation == 'server' ) { $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/pictures?upperLeftRow=' . $ upperLeftRow . '&upperLeftColumn=' . $ upperLeftColumn . '&lowerRightRow=' . $ lowerRightRow . '&lowerRightColumn=' . $ lowerRightColumn . '&picturePath=' . $ picturePath ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'PUT' ) ; } else if ( $ pictureLocation == 'Local' || $ pictureLocation == 'local' ) { if ( ! file_exists ( $ picturePath ) ) { throw new Exception ( 'File Does not Exists' ) ; } $ stream = file_get_contents ( $ picturePath ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/pictures?upperLeftRow=' . $ upperLeftRow . '&upperLeftColumn=' . $ upperLeftColumn . '&lowerRightRow=' . $ lowerRightRow . '&lowerRightColumn=' . $ lowerRightColumn . '&picturePath=' . $ picturePath ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'PUT' , '' , $ stream ) ; } $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) { return true ; } else { return false ; } }
Add picture to worksheet.

@param string $picturePath The picture file path at storage.
@param string $pictureLocation The location of picture.
@param integer $upperLeftRow New image left row position.
@param integer $upperLeftColumn New image left column position.
@param integer $lowerRightRow New image right row position.
@param integer $lowerRightColumn New image right column position.

@return boolean
@throws Exception
Add picture to worksheet .