2015-08-14 57 views
0

當從谷歌Android Studio中嘗試的例子我得到了以下錯誤:電子表格API feed.getEntries()CellEntry

Error:(52, 46) error: incompatible types 
required: CellEntry 
found: SpreadsheetEntry 

在線路:

// Iterate through each cell, printing its value. 
for (CellEntry cell : feed.getEntries()) { 

我使用的例子「工作與基於列表的飼料「從https://developers.google.com/google-apps/spreadsheets/data

此外,是否有可能從公共電子表格中獲取數據而無需身份驗證?

回答

0

我可能是文檔中的拼寫錯誤。在同一頁中有一個例子:

CellFeed cellFeed = service.getFeed(cellFeedUrl, CellFeed.class); 

    // Iterate through each cell, printing its value. 
    for (CellEntry cell : cellFeed.getEntries()) {.... 

正如你可以看到包含進料的目的是從類CellFedd。 嘗試檢查代碼中包含結果的對象是否改變它。

在向api發出請求時,我認爲即使文件是公開的,您也必須進行身份驗證。

相關問題