@Test public void testBatchGetValues() throws IOException { String spreadsheetId = this.createTestSpreadsheet(); this.populateValuesWithStrings(spreadsheetId); List<String> ranges = Arrays.asList("A1:A3", "B1:C1"); BatchGetValuesResponse result = this.snippets.batchGetValues(spreadsheetId, ranges); List<ValueRange> valueRanges = result.getValueRanges(); assertEquals(2, valueRanges.size()); List<List<Object>> values = valueRanges.get(0).getValues(); assertEquals(3, values.size()); }
public BatchGetValuesResponse batchGetValues(String spreadsheetId, List<String> _ranges) throws IOException { Sheets service = this.service; List<String> ranges = Arrays.asList( ); ranges = _ranges; BatchGetValuesResponse result = service.spreadsheets().values().batchGet(spreadsheetId) .setRanges(ranges).execute(); System.out.printf("%d ranges retrieved.", result.getValueRanges().size()); return result; }
SpreadsheetSnippets { public BatchGetValuesResponse batchGetValues(String spreadsheetId, List<String> _ranges) throws IOException { Sheets service = this.service; List<String> ranges = Arrays.asList( ); ranges = _ranges; BatchGetValuesResponse result = service.spreadsheets().values().batchGet(spreadsheetId) .setRanges(ranges).execute(); System.out.printf("%d ranges retrieved.", result.getValueRanges().size()); return result; } }
SpreadsheetSnippets { public BatchGetValuesResponse batchGetValues(String spreadsheetId, List<String> _ranges) throws IOException { Sheets service = this.service; List<String> ranges = Arrays.asList( ); ranges = _ranges; BatchGetValuesResponse result = service.spreadsheets().values().batchGet(spreadsheetId) .setRanges(ranges).execute(); System.out.printf("%d ranges retrieved.", result.getValueRanges().size()); return result; } SpreadsheetSnippets(Sheets service); }
SpreadsheetSnippets { public BatchGetValuesResponse batchGetValues(String spreadsheetId, List<String> _ranges) throws IOException { Sheets service = this.service; List<String> ranges = Arrays.asList( ); ranges = _ranges; BatchGetValuesResponse result = service.spreadsheets().values().batchGet(spreadsheetId) .setRanges(ranges).execute(); System.out.printf("%d ranges retrieved.", result.getValueRanges().size()); return result; } SpreadsheetSnippets(Sheets service); String create(String title); BatchUpdateSpreadsheetResponse batchUpdate(String spreadsheetId, String title,
                                                      String find, String replacement); ValueRange getValues(String spreadsheetId, String range); BatchGetValuesResponse batchGetValues(String spreadsheetId, List<String> _ranges); UpdateValuesResponse updateValues(String spreadsheetId, String range,
                                             String valueInputOption, List<List<Object>> _values); BatchUpdateValuesResponse batchUpdateValues(String spreadsheetId, String range,
                                                       String valueInputOption,
                                                       List<List<Object>> _values); AppendValuesResponse appendValues(String spreadsheetId, String range,
                                             String valueInputOption, List<List<Object>> _values); BatchUpdateSpreadsheetResponse pivotTables(String spreadsheetId); BatchUpdateSpreadsheetResponse conditionalFormat(String spreadsheetId); }
SpreadsheetSnippets { public BatchGetValuesResponse batchGetValues(String spreadsheetId, List<String> _ranges) throws IOException { Sheets service = this.service; List<String> ranges = Arrays.asList( ); ranges = _ranges; BatchGetValuesResponse result = service.spreadsheets().values().batchGet(spreadsheetId) .setRanges(ranges).execute(); System.out.printf("%d ranges retrieved.", result.getValueRanges().size()); return result; } SpreadsheetSnippets(Sheets service); String create(String title); BatchUpdateSpreadsheetResponse batchUpdate(String spreadsheetId, String title,
                                                      String find, String replacement); ValueRange getValues(String spreadsheetId, String range); BatchGetValuesResponse batchGetValues(String spreadsheetId, List<String> _ranges); UpdateValuesResponse updateValues(String spreadsheetId, String range,
                                             String valueInputOption, List<List<Object>> _values); BatchUpdateValuesResponse batchUpdateValues(String spreadsheetId, String range,
                                                       String valueInputOption,
                                                       List<List<Object>> _values); AppendValuesResponse appendValues(String spreadsheetId, String range,
                                             String valueInputOption, List<List<Object>> _values); BatchUpdateSpreadsheetResponse pivotTables(String spreadsheetId); BatchUpdateSpreadsheetResponse conditionalFormat(String spreadsheetId);  }