[英]Reading Google spread sheet without using any credential in Java
I am working with the google Spreadsheet and wanted to read all the data from it without using any credential.json file.我正在使用谷歌电子表格,并希望在不使用任何 credential.json 文件的情况下从中读取所有数据。
What I actually want is, If I have been provided a URL for spreadsheets then I should be able to read the data without using any client secrets.我真正想要的是,如果我获得了电子表格的 URL,那么我应该能够在不使用任何客户端机密的情况下读取数据。 How can I do it?
我该怎么做?
You need to authenticate yourself yo use the API even if the sheet is public.即使工作表是公开的,您也需要对自己进行身份验证并使用 API。
You could try just to make an HTTP request to actually download the information, take a look at this Gist to see all the formats you can use.您可以尝试发出 HTTP 请求来实际下载信息,查看此Gist以查看您可以使用的所有格式。
For exemple download/read the file as CSV:例如,将文件下载/读取为 CSV:
curl 'https://docs.google.com/spreadsheets/d/1pObOjcxHEZHDb0DOA8mxcO3HY_koVcTNdmzjjE7Sj9w/export?format=csv'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.