2015-08-14 37 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发出请求时,我认为即使文件是公开的,您也必须进行身份验证。

相关问题