Google\Spreadsheet\Spreadsheet::getWorksheetByTitle PHP Method

getWorksheetByTitle() public method

Get a single worksheet by it's title. If there is more than one worksheet with the same title then the first one matched will be returned.
public getWorksheetByTitle ( $title ) : Worksheet
return Worksheet
    public function getWorksheetByTitle($title)
    {
        foreach ($this->getWorksheetFeed()->getEntries() as $worksheet) {
            if ($worksheet->getTitle() === $title) {
                return $worksheet;
            }
        }
        throw new WorksheetNotFoundException();
    }