Zend framework Zend GData电子表格添加列名

Zend framework Zend GData电子表格添加列名,zend-framework,gdata,google-sheets,google-docs-api,google-spreadsheet-api,Zend Framework,Gdata,Google Sheets,Google Docs Api,Google Spreadsheet Api,一直在寻找谷歌,谷歌文档和zend文档,但没有太大的成功。我正在尝试使用API和Zend GData将数据添加到Google电子表格中。我成功地抓取了电子表格和工作表键,可以毫无问题地更新现有行 简言之,该项目需要我为前几个月的数据添加更多的列,这是我的问题开始。我可以更新每行的现有数据,但当我尝试向电子表格中添加新的“列”时,什么也没有发生。将更新现有数据,因为新信息不会被插入 我目前的代码如下(假设我已经有了电子表格和工作表键): 由于缺乏文档,这开始让我感到厌烦,因此任何指针都会被大量接受

一直在寻找谷歌,谷歌文档和zend文档,但没有太大的成功。我正在尝试使用API和Zend GData将数据添加到Google电子表格中。我成功地抓取了电子表格和工作表键,可以毫无问题地更新现有行

简言之,该项目需要我为前几个月的数据添加更多的列,这是我的问题开始。我可以更新每行的现有数据,但当我尝试向电子表格中添加新的“列”时,什么也没有发生。将更新现有数据,因为新信息不会被插入

我目前的代码如下(假设我已经有了电子表格和工作表键):


由于缺乏文档,这开始让我感到厌烦,因此任何指针都会被大量接受

您的$spreadsheet是$spreadsheetService变量吗?用于
$query = new Zend_Gdata_Spreadsheets_ListQuery();
$query->setSpreadsheetKey($spreadsheetKey);
$query->setWorksheetId($worksheetId);
$listFeed = $spreadsheet->getListFeed($query);

//$rowData = $listFeed->entries;

foreach ($listFeed as $listEntry) {
    $rowData = $listEntry->getCustom(); 
    $newRow = array();
        //Populate the row data
    foreach($rowData as $field) {
        $newRow[$field->getColumnName()] = $field->getText();
    }
    //Add an array key for the new column       
    $newRow['aug2011'] = 'Some data here';
        $spreadsheet->updateRow($listEntry, $newRow)
}   

exit();