2012-01-04 75 views

回答

1

這個人是不是很容易弄清楚,這裏是爲我工作的代碼(感謝這個articleZend Framework Quick Reference

// Connection & spreadsheet API 
$client = Zend_Gdata_ClientLogin::getHttpClient('[email protected]', 'sunshine-', Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME); 
$service = new Zend_Gdata_Spreadsheets($client); 

// Get worksheet feed 
$query = new Zend_Gdata_Spreadsheets_DocumentQuery(); 
$query->setSpreadsheetKey('your spreadsheet key'); 
$feed = $service->getWorksheetFeed($query); 

// Create new worksheet structure 
$newWorksheet = new Zend_Gdata_Spreadsheets_WorksheetEntry(); 
$newWorksheet->setTitle(new Zend_Gdata_App_Extension_Title("My Brillant New Worsheet", null)); 
$newWorksheet->setRowCount(new Zend_Gdata_Spreadsheets_Extension_RowCount(10)); 
$newWorksheet->setColumnCount(new Zend_Gdata_Spreadsheets_Extension_ColCount(10)); 

// Add new worksheet to worksheets feed 
$service->insertEntry($newWorksheet->saveXML(), $feed->getLink('self')->getHref()); 
+0

非常有用。但是,你知道如何使用[authsub](http://stackoverflow.com/q/18013564/430112) – Gowri 2013-08-05 13:08:41

相關問題