Google\Spreadsheet\Worksheet::update PHP Method

update() public method

Update worksheet
public update ( string $title = null, integer $colCount = null, integer $rowCount = null ) : void
$title string
$colCount integer
$rowCount integer
return void
    public function update($title = null, $colCount = null, $rowCount = null)
    {
        $title = $title ? $title : $this->getTitle();
        $colCount = $colCount ? $colCount : $this->getColCount();
        $rowCount = $rowCount ? $rowCount : $this->getRowCount();
        $entry = new \SimpleXMLElement("\n            <entry\n                xmlns=\"http://www.w3.org/2005/Atom\"\n                xmlns:gs=\"http://schemas.google.com/spreadsheets/2006\">\n            </entry>\n        ");
        $entry->title = $title;
        $entry->addChild("xmlns:gs:rowCount", (int) $rowCount);
        $entry->addChild("xmlns:gs:colCount", (int) $colCount);
        ServiceRequestFactory::getInstance()->put($this->getEditUrl(), $entry->asXML());
    }