curl:谷歌电子表格为.csv [英] curl: google spreadsheet as .csv

查看:115
本文介绍了curl:谷歌电子表格为.csv的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用curl下载我的一个Google电子表格,并将其另存为.csv文件。以下是我使用的命令:

I want to download one of my google spreadsheet using curl and save it as a .csv file. Following is the command I am using:

(curl --silent --header Authorization:GoogleLogin auth = AUTH_KEY https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=SPREADSHEET_KEY&exportFormat= csv )> a.csv

(curl --silent --header "Authorization: GoogleLogin auth=AUTH_KEY" https://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=SPREADSHEET_KEY&exportFormat=csv) > a.csv

这正在下载pdf格式的文件。有人可以帮助我解决困扰我1个小时的问题吗?

This is downloading a file which is in pdf format. Can anybody help me in resolving this issue I am stuck with for 1 hr...

推荐答案

这有效: curl'https://docs.google.com/spreadsheets/d/<yourkey>/export?exportFormat=csv',并带有足够的链接共享参数。

This works: curl 'https://docs.google.com/spreadsheets/d/<yourkey>/export?exportFormat=csv', with adequate link-sharing parameters.

这篇关于curl:谷歌电子表格为.csv的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆