简体   繁体   English

在不使用任何 Java 凭据的情况下阅读 Google 电子表格

[英]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.

相关问题 阅读Google电子表格 - Reading Google spread sheet 如何从Google Spreadsheet获取单元格值,该值可以使用Java中的任何语言和Spreadsheet当前时间 - How to get cell value from google spread sheet which in any language and current time of spread sheet in JAVA 403 - 使用 Java 将数据写入 Google 电子表格的权限不足 - 403 - Insufficient Permission to write data to Google spread sheet using Java 如何使用Java和Drive API在Google Drive上创建电子表格 - How to create a Spread Sheet on Google Drive Using Java and Drive API 谁能帮我从JAVA中的Google电子表格读取数据 - can anyone help me with reading data from google spread sheet in JAVA Google Drive API(java):将数据表/图表添加到电子表格(SpreadsheetEntry) - Google Drive API (java): Add a datatable/chart to a spread sheet (SpreadsheetEntry) 使用 api 读写谷歌电子表格是免费或付费的 - read write to google spread sheet using api is free or paid Google Spread表格,使用/ java附加数据 - Google Spread sheets, appending data using /java 使用java读取存储在wildfly凭证存储中的密码? - Reading passwords stored in credential store in wildfly using java? 使用Java读取Excel工作表的每一行 - Reading each row of excel sheet using Java
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM