public function moveWorksheet($worksheetName, $position)
    {
        //check whether worksheet name is set or not
        if ($this->worksheetName == '')
            throw new Exception('Worksheet name not specified');
        $fieldsArray['DestinationWorsheet'] = $worksheetName;
        $fieldsArray['Position'] = $position;
        $jsonData = json_encode($fieldsArray);
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() .
            '/worksheets/' . $this->worksheetName . '/position';
        $signedURI = Utils::sign($strURI);
        $responseStream = Utils::processCommand($signedURI, 'POST', 'json', $jsonData);
        $json = json_decode($responseStream);
        if ($json->Code == 200)
            return true;
        else
            return false;

    }
public function moveWorksheet($worksheetName, $position)
    {
        //check whether worksheet name is set or not
        if ($this->worksheetName == '')
            throw new Exception('Worksheet name not specified');
        $fieldsArray['DestinationWorsheet'] = $worksheetName;
        $fieldsArray['Position'] = $position;
        $jsonData = json_encode($fieldsArray);
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() .
            '/worksheets/' . $this->worksheetName . '/position';
        $signedURI = Utils::sign($strURI);
        $responseStream = Utils::processCommand($signedURI, 'POST', 'json', $jsonData);
        $json = json_decode($responseStream);
        if ($json->Code == 200)
            return true;
        else
            return false;

    }
public function moveWorksheet ( $ worksheetName , $ position ) { //check whether worksheet name is set or not if ( $ this -> worksheetName == '' ) throw new Exception ( 'Worksheet name not specified' ) ; $ fieldsArray [ 'DestinationWorsheet' ] = $ worksheetName ; $ fieldsArray [ 'Position' ] = $ position ; $ jsonData = json_encode ( $ fieldsArray ) ; $ strURI = Product :: $ baseProductUri . '/cells/' . $ this -> getFileName ( ) . '/worksheets/' . $ this -> worksheetName . '/position' ; $ signedURI = Utils :: sign ( $ strURI ) ; $ responseStream = Utils :: processCommand ( $ signedURI , 'POST' , 'json' , $ jsonData ) ; $ json = json_decode ( $ responseStream ) ; if ( $ json -> Code == 200 ) return true ; else return false ; }
Change position of the worksheet.

@param string $worksheetName Name of the worksheet.
@param integer $position New position of the worksheet.

@return boolean
@throws Exception
Change position of the worksheet .