bobo
bobo

Reputation: 8727

How do we read the data from a public google spreadsheet using Zend_Gdata

I have read the examples here: http://framework.zend.com/manual/en/zend.gdata.spreadsheets.html

But those examples assume the spreadsheet to be read needs authentication:

$service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
$spreadsheetService = new Zend_Gdata_Spreadsheets($client);
$feed = $spreadsheetService->getSpreadsheetFeed();

The spreadsheet I am going to read from is a public one, so I don't really need to provide any authentication right? And what I need to provide is just the url of the spreadsheet.

I tried to read the class description here but still have no idea how it can be done: http://framework.zend.com/apidoc/core/Zend_Gdata/Spreadsheets/Zend_Gdata_Spreadsheets.html

Upvotes: 0

Views: 781

Answers (2)

John
John

Reputation: 21

You CAN see a google public spreadsheet without being logged on. What does authentication mean if not logging on with name and password? You don't need authentication for public documents. So the question above remains.

Upvotes: 2

nuqqsa
nuqqsa

Reputation: 4521

As far as I'm concerned, access to any Google spreadsheet requires a Google account, even if the document is public (did you try to access it in the browser without being logged in to your Google account?). So yes, you need to provide Zend_Gdata with authentication credentials.

Upvotes: 1

Related Questions