是否可以从Google电子表格中检索数据?

时间:2013-09-30 05:59:04

标签: php google-sheets

我想从Google电子表格中检索数据并在我的网站上显示结果,而不是显示所有内容。

这是我的代码: -

$logfile = file("<LINK TO MY GOOGLE SPREADSHEET)");
$findme   = 'code200';

foreach($logfile as $line_num => $line) {
$pos = strpos($line, $findme);
if ($pos === false) {
    echo "The string '$findme' was not found in the string '$logfile'";
}
}

1 个答案:

答案 0 :(得分:1)

是的,Google有Google Drive的电子表格API:https://developers.google.com/google-apps/spreadsheets/

这是一个PHP库,可让您访问电子表格API:https://github.com/asimlqt/php-google-spreadsheet-client

可能还有其他图书馆。 Google "PHP google spreadsheet API"

相关问题