【发布时间】:2016-08-26 01:25:45
【问题描述】:
我正在使用 Java API (V4) 从谷歌表格中读取和编辑数据。到目前为止,我能够根据行号和列号(索引)读取和编辑数据。
- 我想做的是通过数据的特定值来本地化数据(我想使用它的值来获取特定单元格的行号和列号)。
到目前为止,这是我用来编辑数据的工作代码的一部分:
// Copy the format from A1:C1 and paste it into A2:C5, so the data in
// each column has the same background.
requests.add(new Request()
.setCopyPaste(new CopyPasteRequest()
.setSource(new GridRange()
.setSheetId(0)
.setStartRowIndex(0)
.setEndRowIndex(1)
.setStartColumnIndex(0)
.setEndColumnIndex(3))
.setDestination(new GridRange()
.setSheetId(0)
.setStartRowIndex(1)
.setEndRowIndex(6)
.setStartColumnIndex(0)
.setEndColumnIndex(3))
.setPasteType("PASTE_FORMAT")));
BatchUpdateSpreadsheetRequest batchUpdateRequest = new BatchUpdateSpreadsheetRequest()
.setRequests(requests);
谁能帮帮我? 提前谢谢你。
【问题讨论】:
标签: java api find google-spreadsheet-api google-sheets-api