Java Google Sheets API 获取单元格的注释/链接

huangapple go评论82阅读模式
英文:

Java Google Sheets API get notes/links form cell

问题

我需要读取附加数据,比如单元格中的注释(最好是)或链接。在Sheets V4 API中找不到这样的方法。

var values = service.spreadsheets().values()
                .get(spreadsheetId, range)
                .setMajorDimension("ROWS")
                .execute()
                .getValues();

这会返回单元格中的所有数据,但是是否有某个方法/方式可以获取注释呢?

英文:

I need to read additional data, like notes(preferable) or link form a cell. Can't find such method in Sheets V4 API.

	var values = service.spreadsheets().values()
	                    .get(spreadsheetId, range)
	                    .setMajorDimension("ROWS")
	                    .execute()
	                    .getValues();

This returns me all the data in cells, but is there somewhere a method/way to get notes?

答案1

得分: 1

替代 spreadsheets.values.get,你应该使用 spreadsheets.get

通过指定 fields 来获取你感兴趣的值,例如 sheets/data/rowData/values/note

你可以通过检查 资源:电子表格 来找到正确的语法。

英文:

Instead of spreadsheets.values.get you should use spreadsheets.get

Specify fields to the values you are interested in, e.g. sheets/data/rowData/values/note

You can find the right syntax by inspecting the Resource: Spreadsheet.

huangapple
  • 本文由 发表于 2020年8月26日 22:08:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/63599469.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定