Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
谷歌驱动Ruby API赢得';t将电子表格内容作为csv返回_Ruby_Google Sheets_Google Drive Api - Fatal编程技术网

谷歌驱动Ruby API赢得';t将电子表格内容作为csv返回

谷歌驱动Ruby API赢得';t将电子表格内容作为csv返回,ruby,google-sheets,google-drive-api,Ruby,Google Sheets,Google Drive Api,我正在尝试编写一个Ruby脚本,以csv格式从Google Drive自动下载电子表格。生成的文件始终为空 有趣的是,如果我以.xlsx格式下载它,我会得到一个几乎可以正常工作的文件。(Excel将打开该文件,但必须先修复它。) 有人看到我的代码中有错误吗?(下面的代码是Google提供的“quickstart.rb”示例代码,最后做了一些修改。) 我不确定您正在使用的库,但根据他们文档中的示例,应该包括exportLinks以及相应的 download_url = file['exportLi

我正在尝试编写一个Ruby脚本,以csv格式从Google Drive自动下载电子表格。生成的文件始终为空

有趣的是,如果我以.xlsx格式下载它,我会得到一个几乎可以正常工作的文件。(Excel将打开该文件,但必须先修复它。)

有人看到我的代码中有错误吗?(下面的代码是Google提供的“quickstart.rb”示例代码,最后做了一些修改。)


我不确定您正在使用的库,但根据他们文档中的示例,应该包括
exportLinks
以及相应的

download_url = file['exportLinks']['application/pdf']
希望这有帮助

download_url = file['exportLinks']['application/pdf']