asimlqt / php-google-spreadsheet-client

A PHP library for accessing and manipulating Google Spreadsheets
Other
543 stars 154 forks source link

Error when reading Google Sheet #81

Closed XAMelleOH closed 8 years ago

XAMelleOH commented 9 years ago

When trying to read this doc: https://docs.google.com/a/detto.com.ua/spreadsheet/lv?key=0AokYcCWjwZn_dHJFcXI0djZFdWNXT2Q0MmhzajVITWc&f=true&noheader=true&gid=0 I get an error (nothing displayed, 500 response code). About 20 other ones are ok.

I've discovered, the error is in getWorksheets(); and if more precisely in $worksheet->setPostUrl($this->getPostUrl()); of WorksheetFeed.php

I assume it can be because of using ™ in the worksheet names, but not sure 100%.

XAMelleOH commented 9 years ago

Anyone working on this???

asimlqt commented 8 years ago

Thanks for supplying a sample sheet.

I've just tested this using the following code and it worked fine.

$spreadsheetService = new Google\Spreadsheet\SpreadsheetService();
$spreadsheet = $spreadsheetService->getSpreadsheetById("1foXfuR0jNo3idUv3dKhH-Bh9yGV4SJ-ia14rMmHKoJw");
$feed = $spreadsheet->getWorksheets();
$ws = $feed->getByTitle("Кузя™ 2014");
var_dump($ws->getListFeed());