List Info

Thread: Spreadsheet Demo




Spreadsheet Demo
user name
2008-04-30 18:14:42
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-tp16992749
p16992749.html
Sent from the Zend gdata mailing list archive at
Nabble.com.


Re: Spreadsheet Demo
user name
2008-06-09 00:47:38
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 < gizzargmail.com">gizzargmail.com> wrote:

Am I safe to assume that from now on we have to hardcode in the 5th element
after a "/&quot; delimited split to get spreadsheet keys?

This is straight from the demo Gdata Spreadsheet app:

$currKey = split(';/', $feed->entries[$input]->id->text);
$this-&gt;currKey = $currKey[5];
$query = new Zend_Gdata_Spreadsheets_DocumentQuery();
$query->setSpreadsheetKey($this->currKey);
$feed = $this->gdClient-&gt;getWorksheetFeed($query);
$input = getInput(&quot;nSelection");
$currWkshtId = split(';/', $feed->entries[$input]->id->text);
$this-&gt;currWkshtId = $currWkshtId[8];

Oh, and also don't forget the 8th element after a "/&quot; 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 = 'id9;;

   public function __construct($text = null)
   {
       parent::__construct();
       $this->_text = $text;
   }
}


What the community really needs is this:

$service = new Zend_Gdata_Spreadsheet();

$spreadsheets = $service-&gt;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.


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )