当前位置: 首页>>代码示例>>PHP>>正文


PHP Zend_Gdata_Spreadsheets类代码示例

本文整理汇总了PHP中Zend_Gdata_Spreadsheets的典型用法代码示例。如果您正苦于以下问题:PHP Zend_Gdata_Spreadsheets类的具体用法?PHP Zend_Gdata_Spreadsheets怎么用?PHP Zend_Gdata_Spreadsheets使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Zend_Gdata_Spreadsheets类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: gdata_insert_row

 public function gdata_insert_row()
 {
     ProjectConfiguration::registerZend();
     Zend_Loader::loadClass('Zend_Gdata_AuthSub');
     Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
     Zend_Loader::loadClass('Zend_Gdata_Spreadsheets');
     Zend_Loader::loadClass('Zend_Gdata_Docs');
     $username = "sindvig.dentista";
     $password = "@bcd1234";
     //Chave do arquivo
     $key = "0Ak_oCZQf3sTidEJnZGQ4MHdhS0R1NUlSeG1ORkpnalE";
     //Carregando o serviço do arquivo
     $service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
     $client = Zend_Gdata_ClientLogin::getHttpClient($username, $password, $service);
     $spreadSheetService = new Zend_Gdata_Spreadsheets($client);
     //Pegando as planilhas do arquivo
     $query = new Zend_Gdata_Spreadsheets_DocumentQuery();
     $query->setSpreadsheetKey($key);
     $feed = $spreadSheetService->getWorksheetFeed($query);
     //Escolhendo a planilha correta
     foreach ($feed->entries as $entry) {
         if ($entry->getTitle() == 'Disponiveis') {
             $worksheetId = basename($entry->getId());
         }
     }
     //Configura variaveis da nova linha na planilha
     $assoc = $this->getAssociado();
     $matricula = $this->isTitular() ? $assoc->getMatricula() : $assoc->getTitular()->getMatricula();
     $dependenteId = $this->isDependente() ? $assoc->getId() : '0';
     //Monta array para o serviço do arquivo
     $rowData = array("data" => $this->getDateTimeObject('created_at')->format('Y-m-d'), "matricula" => $matricula, "nome" => $assoc->getNome(), "dependenteid" => $dependenteId, "encaminhaid" => $this->getId());
     //Insere na Planilha
     $insertedListEntry = $spreadSheetService->insertRow($rowData, $key, $worksheetId);
 }
开发者ID:sindvigti,项目名称:sindhealth,代码行数:34,代码来源:Encaminhamento.class.php

示例2: postInsert

 public function postInsert($values)
 {
     set_time_limit(0);
     error_reporting(E_ALL);
     ini_set('display_errors', '1');
     $clientLibraryPath = sfConfig::get('sf_lib_dir') . '/vendor/ZendGdata-1.11.11/library';
     $oldPath = set_include_path($clientLibraryPath);
     // load Zend Gdata libraries
     require_once sfConfig::get('sf_lib_dir') . '/vendor/ZendGdata-1.11.11/library/Zend/Loader.php';
     Zend_Loader::loadClass('Zend_Gdata_Spreadsheets');
     Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
     // set credentials for ClientLogin authentication
     $user = "cmp@tvcultura.com.br";
     $pass = "alipio@28042011";
     try {
         // connect to API
         $service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
         $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
         $service = new Zend_Gdata_Spreadsheets($client);
         // get spreadsheet entry
         $ssEntry = $service->getSpreadsheetEntry('https://spreadsheets.google.com/feeds/spreadsheets/' . $this->getSpreadsheetId());
         // get worksheet feed for this spreadsheet
         $wsFeed = $service->getWorksheetFeed($ssEntry);
         // create new entry
         $wsEntry = new Zend_Gdata_Spreadsheets_WorksheetEntry();
         $title = new Zend_Gdata_App_Extension_Title($this->getQuestion());
         $wsEntry->setTitle($title);
         $row = new Zend_Gdata_Spreadsheets_Extension_RowCount('10');
         $wsEntry->setRowCount($row);
         $col = new Zend_Gdata_Spreadsheets_Extension_ColCount('3');
         $wsEntry->setColumnCount($col);
         // insert entry
         $entryResult = $service->insertEntry($wsEntry, $wsFeed->getLink('self')->getHref());
         $wsid = end(explode("/", $entryResult->id));
         echo 'The ID of the new worksheet entry is: ' . $wsid;
         $this->worksheet_id = $wsid;
         $this->save();
         //die('ok');
     } catch (Exception $e) {
         die('ERROR: ' . $e->getMessage());
     }
 }
开发者ID:GustavoAdolfo,项目名称:cmais-frontend-2,代码行数:42,代码来源:AssetQuestion.class.php

示例3: testCustomElementsCollected

 public function testCustomElementsCollected() {
     $rowData = array();
     $rowData['a1'] = 'new';
     $rowData['b1'] = 'row';
     $rowData['c1'] = 'data';
     $rowData['d1'] = 'here';
     $entry = $this->gdata->insertRow($rowData, $this->sprKey);
     
     $this->assertEquals(4, count($entry->custom));
     $this->assertEquals(4, count($entry->customByName));
     
     $this->assertEquals('new', $entry->custom[0]->getText());
     $this->assertEquals('row', $entry->custom[1]->getText());
     $this->assertEquals('data', $entry->custom[2]->getText());
     $this->assertEquals('here', $entry->custom[3]->getText());
     
     $this->assertEquals('new', $entry->customByName['a1']->getText());
     $this->assertEquals('row', $entry->customByName['b1']->getText());
     $this->assertEquals('data', $entry->customByName['c1']->getText());
     $this->assertEquals('here', $entry->customByName['d1']->getText());
     
     $ssTest = new Zend_Gdata_Spreadsheets($entry->getHttpClient());
     $ssTest->delete($entry);
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:24,代码来源:SpreadsheetsOnlineTest.php

示例4: getSpreadsheetId

function getSpreadsheetId()
{
    try {
        // connect to API
        $httpClient = $accessToken->getHttpClient($oauthOptions);
        $client = new Zend_Gdata_Docs($httpClient, "leopizzo991");
        ///$token = new Zend_Oauth_Token_Access();
        $service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
        //$client = Zend_Gdata_ClientLogin::getHttpClient("leopizzodb", "l30p1z04d", $service);
        $service = new Zend_Gdata_Spreadsheets($client);
        // get list of available spreadsheets
        $feed = $service->getSpreadsheetFeed();
    } catch (Exception $e) {
        die('ERROR: ' . $e->getMessage());
    }
    foreach ($feed->entries as $entry) {
        $spreadsheetURL = $entry->id;
    }
    $spreadsheetKey = basename($spreadsheetURL);
    $query = new Zend_Gdata_Spreadsheets_DocumentQuery();
    $query->setSpreadsheetKey($spreadsheetKey);
    $feed = $service->getWorksheetFeed($query);
    //echo "Spreadsheet Key: <strong>$spreadsheetKey</strong> <br>";
    foreach ($feed as $entry) {
        $sName = $entry->title->text;
        echo "ID of sheet {$sName} is: <strong>" . basename($entry->id) . "</strong><br>";
    }
}
开发者ID:alpaolo,项目名称:leopizzonew-customizr-pro-child,代码行数:28,代码来源:dealers_functions-xs.php

示例5: set_include_path

<?php

require_once 'php/config.php';
set_include_path("gdata/library");
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Spreadsheets');
Zend_Loader::loadClass('Zend_Gdata_App_AuthException');
Zend_Loader::loadClass('Zend_Http_Client');
try {
    $client = Zend_Gdata_ClientLogin::getHttpClient($email, $password, Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME);
} catch (Zend_Gdata_App_AuthException $ae) {
    exit("Error Connecting");
}
$spreadsheetService = new Zend_Gdata_Spreadsheets($client);
$post_data = file_get_contents("php://input");
$post_data = json_decode($post_data, true);
$defaults = array('email' => 'none provided', 'date' => date('j F Y h:i:s A'));
$bug = array_merge($defaults, $post_data);
$insertedListEntry = $spreadsheetService->insertRow($bug, $spreadsheetKey, $worksheetId);
echo json_encode($bug);
开发者ID:holtchesley,项目名称:Zeega,代码行数:22,代码来源:report.php

示例6: check_ipn

function check_ipn()
{
    global $wpdb, $purchase_log, $wpsc_cart;
    $wpcb_atos = get_option('wpcb_atos');
    $wpcb_general = get_option('wpcb_general');
    $wpcb_dev = get_option('wpcb_dev');
    $purch_log_email = get_option('purch_log_email');
    if (!$purch_log_email) {
        $purch_log_email = get_bloginfo('admin_email');
    }
    // Automatic Response ATOS :
    if ($_GET['ipn'] == 'atos') {
        if (array_key_exists('mode_demo', $wpcb_dev) && $wpcb_dev['mode_demo']) {
            // Ce Kit de demo a du vous etre envoyé par la banque
            $pathfile = dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/cgi-bin/demo/pathfile";
            $path_bin_response = dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/cgi-bin/demo/response";
            $logfile = dirname(dirname(dirname(dirname(dirname(__FILE__))))) . "/cgi-bin/demo/logfile.txt";
        } else {
            $pathfile = $wpcb_atos['pathfile'];
            $path_bin_response = $wpcb_atos['path_bin_response'];
            $logfile = $wpcb_atos['logfile'];
        }
        // Initialisation du chemin du fichier de log :
        if (isset($_POST['DATA'])) {
            $data = escapeshellcmd($_POST['DATA']);
            $message = "message={$data}";
            $pathfile = "pathfile=" . $pathfile;
            if (isset($_POST['sandbox'])) {
                $result = $_POST['sandbox'];
            } else {
                $result = exec("{$path_bin_response} {$pathfile} {$message}");
            }
            $tableau = explode("!", $result);
            $response = array('code' => $tableau[1], 'error' => $tableau[2], 'merchantid' => $tableau[3], 'merchantcountry' => $tableau[4], 'amount' => $tableau[5], 'transactionid' => $tableau[6], 'paymentmeans' => $tableau[7], 'transmissiondate' => $tableau[8], 'paymenttime' => $tableau[9], 'paymentdate' => $tableau[10], 'responsecode' => $tableau[11], 'paymentcertificate' => $tableau[12], 'authorisationid' => $tableau[13], 'currencycode' => $tableau[14], 'cardnumber' => $tableau[15], 'cvvflag' => $tableau[16], 'cvvresponsecode' => $tableau[17], 'bankresponsecode' => $tableau[18], 'complementarycode' => $tableau[19], 'complementaryinfo' => $tableau[20], 'returncontext' => $tableau[21], 'caddie' => $tableau[22], 'receiptcomplement' => $tableau[23], 'merchantlanguage' => $tableau[24], 'language' => $tableau[25], 'customerid' => $tableau[26], 'orderid' => $tableau[27], 'customeremail' => $tableau[28], 'customeripaddress' => $tableau[29], 'captureday' => $tableau[30], 'capturemode' => $tableau[31], 'data' => $tableau[32]);
            //Session id used by wp ecommerce :
            $sessionid = $response['orderid'];
            // A venir : Ajout dans un google spreadsheet qui a toutes les entêtes précédentes (requis Zend)
            // A coler dans la page admin pour tester
            if (WP_ZEND_FRAMEWORK) {
                $GoogleConnection = true;
                $SpreadSheetConnection = true;
                try {
                    $client = Zend_Gdata_ClientLogin::getHttpClient($wpcb_general['googleemail'], $wpcb_general['googlepassword']);
                } catch (Zend_Gdata_App_AuthException $ae) {
                    echo $ae->exception();
                    $GoogleConnection = false;
                }
                if ($GoogleConnection) {
                    // Test
                    $service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
                    $client = Zend_Gdata_ClientLogin::getHttpClient($wpcb_general['googleemail'], $wpcb_general['googlepassword'], $service);
                    // On va chercher le numéro de la feuille :
                    $query_worksheet = new Zend_Gdata_Spreadsheets_DocumentQuery();
                    // todo pour pas de client ici ?
                    $query_worksheet->setSpreadsheetKey($wpcb_general['spreadsheetKey']);
                    $spreadsheetService = new Zend_Gdata_Spreadsheets($client);
                    try {
                        $feed = $spreadsheetService->getWorksheetFeed($query_worksheet);
                    } catch (Zend_Gdata_App_HttpException $ae) {
                        echo $ae->exception();
                        $SpreadSheetConnection = false;
                    }
                    if ($SpreadSheetConnection) {
                        // Tout bon on ajoute :
                        foreach ($feed->entries as $entry) {
                            if ($entry->title->text == 'CB') {
                                $worksheetId_CB = basename($entry->id);
                            } elseif ($entry->title->text == 'Paypal') {
                                $worksheetId_Paypal = basename($entry->id);
                            }
                        }
                        $spreadsheetService = new Zend_Gdata_Spreadsheets($client);
                        // Insert row in google spreadsheet :
                        $insertedListEntry = $spreadsheetService->insertRow($response, $wpcb_general['spreadsheetKey'], $worksheetId_CB);
                    } else {
                        wp_mail($purch_log_email, 'Email envoyé depuis le auto_response', 'Mauvais Numero de Spreadsheet dans les options du plugin wpcb');
                    }
                } else {
                    if (WP_DEBUG) {
                        wp_mail($purch_log_email, 'Email envoyé depuis le auto_response', 'Mauvais login/mot de pass google dans les options du plugin wpcb');
                    }
                }
            } else {
                wp_mail($purch_log_email, 'Email envoyé depuis le auto_response', 'Installer Zend pour ajouter automatiquement les ventes à google drive !');
            }
            //  analyse du code retour
            if (isset($_POST['sandbox'])) {
                $message = "-----------SANDBOX-------------------------\n";
                foreach ($response as $k => $v) {
                    $message .= $k . " = " . $v . "\n";
                }
                $message .= "-------------------------------------------\n";
                if ($logfile) {
                    $fp = fopen($logfile, "a");
                    fwrite($fp, $message);
                    fclose($fp);
                }
                echo $message;
                wp_mail($purch_log_email, 'Email pour vous dire qu\'un paiement SANDBOX est arrivé !', $message);
            } else {
//.........这里部分代码省略.........
开发者ID:Reghyz,项目名称:wpcb,代码行数:101,代码来源:index.php

示例7: logout

        logout($APP_URL);
        break;
    case 'request_token':
        $_SESSION['REQUEST_TOKEN'] = serialize($consumer->fetchRequestToken(implode(' ', $scopes), $APP_URL . '?action=access_token'));
        $consumer->authorizeRequestToken();
        break;
    case 'access_token':
        $_SESSION['ACCESS_TOKEN'] = serialize($consumer->fetchAccessToken());
        header('Location: ' . $APP_URL);
        break;
    default:
        if (isset($_SESSION['ACCESS_TOKEN'])) {
            $accessToken = unserialize($_SESSION['ACCESS_TOKEN']);
            $httpClient = $accessToken->getHttpClient($consumer->getOauthOptions());
            $docsService = new Zend_Gdata_Docs($httpClient, $APP_NAME);
            $spreadsheetsService = new Zend_Gdata_Spreadsheets($httpClient, $APP_NAME);
            // Retrieve user's list of Google Docs and spreadsheet list.
            $docsFeed = $docsService->getDocumentListFeed();
            $spreadsheetFeed = $spreadsheetsService->getSpreadsheetFeed('http://spreadsheets.google.com/feeds/spreadsheets/private/full?max-results=100');
            renderHTML($accessToken, array($docsFeed, $spreadsheetFeed));
        } else {
            renderHTML();
        }
}
/**
 * Returns a the base URL of the current running web app.
 *
 * @return string
 */
function getAppURL()
{
开发者ID:MichaelGogeshvili,项目名称:sitewatch,代码行数:31,代码来源:index.php

示例8: array

// front end options
$frontendOptions = array('lifetime' => NULL);
// backend options
$backendOptions = array('cache_dir' => $cache_dir);
@mkdir($cache_dir, 0700, true);
// make cache object
$cache = Zend_Cache::factory('Output', 'File', $frontendOptions, $backendOptions);
if (!$cache->start($post_col)) {
    // load Zend Gdata libraries
    Zend_Loader::loadClass('Zend_Gdata_Spreadsheets');
    Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
    try {
        // connect to API
        $service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
        $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
        $service = new Zend_Gdata_Spreadsheets($client);
        // define worksheet query
        // get list feed for query
        $query = new Zend_Gdata_Spreadsheets_ListQuery();
        $query->setSpreadsheetKey($spreadhsheet_key);
        $query->setWorksheetId($people_wksht);
    } catch (Exception $e) {
        die('ERROR: ' . $e->getMessage());
    }
    ?>

<?php 
    function labelBOD($entry)
    {
        if ($entry->getCustomByName('bodindustryprivatesector') == 'Y' || $entry->getCustomByName('bodacademicresearcheducationsector') == 'Y' || $entry->getCustomByName('bodpublicagenciesnonprofitothersector') == 'Y' || $entry->getCustomByName('bodatlarge') == 'Y' || $entry->getCustomByName('bodpublicseat') == 'Y' || $entry->getCustomByName('bodaffiliateseat') == 'Y' || $entry->getCustomByName('bodsustainingseat') == 'Y') {
            return ' (B)';
开发者ID:jcothran,项目名称:xenia,代码行数:31,代码来源:comm.php

示例9: Zend_Gdata_Spreadsheets

// http://framework.zend.com/downloads/latest
// http://www.jazzerup.com/blog/google-spreadsheets-api-php-zend
// http://stackoverflow.com/questions/7455239/error-inserting-row-in-google-spreadsheet-using-zend-gdata
// Include the loader and Google API classes for spreadsheets
// Install Zend Framework from above url, add to php.ini include path
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Spreadsheets');
Zend_Loader::loadClass('Zend_Http_Client');
// Set your Google Docs credentials here
$user = 'your@gmail.com';
$pass = 'password';
$service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
$client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
$spreadsheetService = new Zend_Gdata_Spreadsheets($client);
$feed = $spreadsheetService->getSpreadsheetFeed();
// This is not the url displayed when logged in to Goolge Docs, because
// that would just make sense. Oh, no - instead it has to be abstracted
// away in the object. This is the feed url.
$sheetName = "Sheet1";
foreach ($feed->entries as $entry) {
    if ($entry->title->text == $sheetName) {
        $spreadsheetURL = $entry->id;
        echo "SpreadsheetURL is: {$spreadsheetURL} <br /> \n";
        break;
    }
}
$spreadsheetKey = basename($spreadsheetURL);
$query = new Zend_Gdata_Spreadsheets_DocumentQuery();
$query->setSpreadsheetKey($spreadsheetKey);
开发者ID:RelativePrime,项目名称:scripting,代码行数:31,代码来源:googleZend.php

示例10: gdata_import

function gdata_import($attrib)
{
    if ($attrib["key"] == "" || $attrib["worksheet"] == "" || $attrib["user"] == "" || $attrib["pass"] == "") {
        echo 'ERROR: SET ALL ATTRIBUTES i.e sheet, worksheet, user, pass and columns. ';
        return;
    }
    // load Zend Gdata libraries
    set_include_path(get_include_path() . PATH_SEPARATOR . WP_PLUGIN_DIR . "//gdata-importer//");
    require_once 'Zend/Loader.php';
    Zend_Loader::loadClass('Zend_Gdata_Spreadsheets');
    Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
    // set credentials for ClientLogin authentication
    $user = $attrib["user"];
    $pass = $attrib["pass"];
    try {
        // connect to API
        $service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
        $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
        $service = new Zend_Gdata_Spreadsheets($client);
        // get spreadsheet entry
        $ssEntry = $service->getSpreadsheetEntry('https://spreadsheets.google.com/feeds/spreadsheets/' . $attrib["key"]);
        // get worksheets in this spreadsheet
        $wsFeed = $ssEntry->getWorksheets($attrib["worksheet"]);
    } catch (Exception $e) {
        echo 'ERROR: ' . $e->getMessage();
        return;
    }
    $content = <<<HTML
\t<table>
HTML;
    foreach ($wsFeed as $wsEntry) {
        if ($wsEntry->getTitle() == $attrib["worksheet"]) {
            //get title
            $query = new Zend_Gdata_Spreadsheets_CellQuery();
            $query->setSpreadsheetKey($attrib["key"]);
            $id = $wsEntry->getId();
            $arr = explode('/', $id);
            $query->setWorksheetId($arr[sizeof($arr) - 1]);
            $query->setMinRow(1);
            $query->setMaxRow(1);
            $cellFeed = $service->getCellFeed($query);
            $content = $content . "<tr>";
            foreach ($cellFeed as $cellEntry) {
                $content = $content . "<td>" . $cellEntry->getCell()->getText() . "</td>";
            }
            $content = $content . "</tr>";
            //get content
            $rows = $wsEntry->getContentsAsRows();
            foreach ($rows as $row) {
                $content = $content . "<tr>";
                foreach ($row as $key => $value) {
                    $content = $content . "<td>" . $value . "</td>";
                }
                $content = $content . "</tr>";
            }
        }
    }
    $content = $content . <<<HTML
\t\t</tbody>
\t</table>
HTML;
    return $content;
}
开发者ID:EliasGoldberg,项目名称:troop-sim,代码行数:63,代码来源:index.php

示例11: testInsertUpdateDeleteRow3

 public function testInsertUpdateDeleteRow3()
 {
     $rowData = array();
     $rowData['a1'] = 'new';
     $rowData['b1'] = 'row';
     $rowData['c1'] = 'data';
     $rowData['d1'] = 'here';
     $entry = $this->gdata->insertRow($rowData, $this->sprKey);
     $rowData['a1'] = 'newer';
     $entry = $this->gdata->updateRow($entry, $rowData);
     $ssTest = new Zend_Gdata_Spreadsheets($entry->getHttpClient());
     $ssTest->delete($entry);
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:13,代码来源:SpreadsheetsOnlineTest.php

示例12: Zend_Gdata_Spreadsheets

  </head>
  <body>
    <?php 
//die("here");
// load Zend Gdata libraries
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata_Spreadsheets');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
// set credentials for ClientLogin authentication
$user = "cmaere@kcn.unima.mw";
$pass = "dumitembo";
try {
    // connect to API
    $service = Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME;
    $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);
    $service = new Zend_Gdata_Spreadsheets($client);
    // get spreadsheet entry
    die($ssEntry . "am there");
    $ssEntry = $service->getSpreadsheetEntry('https://docs.google.com/a/kcn.unima.mw/spreadsheet/ccc?key=0AumyFvx6NCRWdHRsUTFLYnBRcThmQ0RpaGwtOU1BNUE#gid=0');
    // get worksheet feed for this spreadsheet
    $wsFeed = $service->getWorksheetFeed($ssEntry);
    // create new entry
    $wsEntry = new Zend_Gdata_Spreadsheets_WorksheetEntry();
    $title = new Zend_Gdata_App_Extension_Title('Jan 2011');
    $wsEntry->setTitle($title);
    $row = new Zend_Gdata_Spreadsheets_Extension_RowCount('10');
    $wsEntry->setRowCount($row);
    $col = new Zend_Gdata_Spreadsheets_Extension_ColCount('10');
    $wsEntry->setColumnCount($col);
    // insert entry
    $entryResult = $service->insertEntry($wsEntry, $wsFeed->getLink('self')->getHref());
开发者ID:cmaere,项目名称:saris_dev,代码行数:31,代码来源:admissionNorminalRoll.php

示例13: catch

 * @subpackage Demos
 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
require_once 'Zend/Loader.php';
Zend_Loader::loadClass('Zend_Gdata');
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
Zend_Loader::loadClass('Zend_Gdata_Spreadsheets');
Zend_Loader::loadClass('Zend_Gdata_App_AuthException');
Zend_Loader::loadClass('Zend_Http_Client');
try {
    $client = Zend_Gdata_ClientLogin::getHttpClient($email, $password, Zend_Gdata_Spreadsheets::AUTH_SERVICE_NAME);
} catch (Zend_Gdata_App_AuthException $ae) {
    exit("Error Connecting");
}
$spreadsheetService = new Zend_Gdata_Spreadsheets($client);
$query = new Zend_Gdata_Spreadsheets_DocumentQuery();
//$query->setSpreadsheetKey($spreadsheetKey);
//$feed = $spreadsheetService->getWorksheetFeed($query);
$feed = $spreadsheetService->getSpreadsheetFeed($query);
foreach ($feed->entries as $entry) {
    echo $entry->id->text;
    echo "<br>";
    echo $entry->title->text;
}
/*
foreach($feed->entries as $entry){
			$wkshtId = explode('/', $entry->id->text);
			echo $wkshtId[8];
			echo $entry->title->text;
		}
开发者ID:holtchesley,项目名称:Zeega,代码行数:31,代码来源:worksheets.php

示例14: getWorksheets

 /**
  * Returns the worksheets in this spreadsheet
  *
  * @return Zend_Gdata_Spreadsheets_WorksheetFeed The worksheets
  */
 public function getWorksheets()
 {
     $service = new Zend_Gdata_Spreadsheets($this->getHttpClient());
     return $service->getWorksheetFeed($this);
 }
开发者ID:bitExpert,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:10,代码来源:SpreadsheetEntry.php

示例15: getContentsAsCells

 /**
  * Returns the content of all cells as an associative array, indexed 
  * off the cell location  (ie 'A1', 'D4', etc).  Each element of 
  * the array is an associative array with a 'value' and a 'function'.  
  * Only non-empty cells are returned by default.  'range' is the 
  * value of the 'range' query parameter specified at:
  * http://code.google.com/apis/spreadsheets/reference.html#cells_Parameters
  *
  * @param string $range The range of cells to retrieve
  * @param boolean $empty Whether to retrieve empty cells
  * @return array An associative array of cells
  */
 public function getContentsAsCells($range = null, $empty = false)
 {
     $service = new Zend_Gdata_Spreadsheets($this->getHttpClient());
     return $service->getSpreadsheetCellFeedContents($this, $range, $empty);
 }
开发者ID:janssit,项目名称:www.alu-andries.be,代码行数:17,代码来源:WorksheetEntry.php


注:本文中的Zend_Gdata_Spreadsheets类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。