Zend/Gdata/Spreadsheets.php
public function insertRow($rowData, $key, $wkshtId = 'default')
    {
        $newEntry = new Zend_Gdata_Spreadsheets_ListEntry();
        $newCustomArr = array();
        foreach ($rowData as $k => $v) {
            $newCustom = new Zend_Gdata_Spreadsheets_Extension_Custom();
            $newCustom->setText($v)->setColumnName($k);
            $newEntry->addCustom($newCustom);
        }

        $query = new Zend_Gdata_Spreadsheets_ListQuery();
        $query->setSpreadsheetKey($key);
        $query->setWorksheetId($wkshtId);

        $feed = $this->getListFeed($query);
        $editLink = $feed->getLink('http://schemas.google.com/g/2005#post');

        return $this->insertEntry($newEntry->saveXML(), $editLink->href, 'Zend_Gdata_Spreadsheets_ListEntry');
    }
public function insertRow($rowData, $key, $wkshtId = 'default')
    {
        $newEntry = new Zend_Gdata_Spreadsheets_ListEntry();
        $newCustomArr = array();
        foreach ($rowData as $k => $v) {
            $newCustom = new Zend_Gdata_Spreadsheets_Extension_Custom();
            $newCustom->setText($v)->setColumnName($k);
            $newEntry->addCustom($newCustom);
        }

        $query = new Zend_Gdata_Spreadsheets_ListQuery();
        $query->setSpreadsheetKey($key);
        $query->setWorksheetId($wkshtId);

        $feed = $this->getListFeed($query);
        $editLink = $feed->getLink('http://schemas.google.com/g/2005#post');

        return $this->insertEntry($newEntry->saveXML(), $editLink->href, 'Zend_Gdata_Spreadsheets_ListEntry');
    }
public function insertRow ( $ rowData , $ key , $ wkshtId = 'default' ) { $ newEntry = new Zend_Gdata_Spreadsheets_ListEntry ( ) ; $ newCustomArr = array ( ) ; foreach ( $ rowData as $ k => $ v ) { $ newCustom = new Zend_Gdata_Spreadsheets_Extension_Custom ( ) ; $ newCustom -> setText ( $ v ) -> setColumnName ( $ k ) ; $ newEntry -> addCustom ( $ newCustom ) ; } $ query = new Zend_Gdata_Spreadsheets_ListQuery ( ) ; $ query -> setSpreadsheetKey ( $ key ) ; $ query -> setWorksheetId ( $ wkshtId ) ; $ feed = $ this -> getListFeed ( $ query ) ; $ editLink = $ feed -> getLink ( 'http://schemas.google.com/g/2005#post' ) ; return $ this -> insertEntry ( $ newEntry -> saveXML ( ) , $ editLink -> href , 'Zend_Gdata_Spreadsheets_ListEntry' ) ; }
Inserts a new row with provided data.

@param array $rowData An array of column header to row data
@param string $key The key of the spreadsheet to modify
@param string $wkshtId (optional) The worksheet to modify
@return ListEntry The inserted row
Inserts a new row with provided data .