|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Spreadsheet DemoAm I safe to assume that from now on we have to hardcode in the 5th element after a "/" delimited split to get spreadsheet keys?
This is straight from the demo Gdata Spreadsheet app: $currKey = split('/', $feed->entries[$input]->id->text); $this->currKey = $currKey[5]; $query = new Zend_Gdata_Spreadsheets_DocumentQuery(); $query->setSpreadsheetKey($this->currKey); $feed = $this->gdClient->getWorksheetFeed($query); $input = getInput("\nSelection"); $currWkshtId = split('/', $feed->entries[$input]->id->text); $this->currWkshtId = $currWkshtId[8]; Oh, and also don't forget the 8th element after a "/" delimited split on the worksheet entry id object getText() method call!!!!!!!!!!!!!!!!!! We are treated with such useful classes as: class Zend_Gdata_App_Extension_Id extends Zend_Gdata_App_Extension { protected $_rootElement = 'id'; public function __construct($text = null) { parent::__construct(); $this->_text = $text; } } What the community really needs is this: $service = new Zend_Gdata_Spreadsheet(); $spreadsheets = $service->getSpreadsheets(); foreach($spreadsheets as $spreadsheet) { foreach($spreadsheet->getWorksheets() as $worksheet) { print_r($worksheet->getCellValue(...)); // just prints out the values in the worksheet } } I seem to recall PEAR has an Excel reader library that is more elegant than the Gdata Spreadsheet interface. |
|
|
Re: Spreadsheet DemoHi Ken,
It's been a little while, but I believe we answered some of your concerns in r9641. Please see: http://framework.zend.com/issues/browse/ZF-3416 This allows iterating over spreadsheets and worksheets. Not many changes-- just adding helper methods in the SpreadsheetEntry and WorksheetEntry classes and a few helper functions in Zend_Gdata_Spreadsheets. Example usage is in the above Jira issue. Please let us know what you think. Cheers, -Ryan On Wed, Apr 30, 2008 at 4:14 PM, Ken Chau <gizzar@...> wrote:
|
| Free embeddable forum powered by Nabble | Forum Help |