« Return to Thread: Spreadsheet Demo

Re: Spreadsheet Demo

by Ryan Boyd-3 :: Rate this Message:

Reply to Author | View in Thread

Hi 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:

Am 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.
--
View this message in context: http://www.nabble.com/Spreadsheet-Demo-tp16992749p16992749.html
Sent from the Zend gdata mailing list archive at Nabble.com.


 « Return to Thread: Spreadsheet Demo