Skip to content Skip to sidebar Skip to footer

Google Sheets Api V4 Appending Data Getting Bad Request 400 Error

I am trying to append Sheets row, I am trying to put 2 Strings in single row in 2 columns. Here is the code: String range = 'Write!A2:E200'; String spreadsheetId = SPREADSHEET_ID;

Solution 1:

Found solution, this is working for me:

List<Object> lists = newArrayList<>();

lists.add("String 1");
lists.add("String 2");

List<List<Object>> values = newArrayList<>();
values.add(lists);

This will append "String 1" to A1 and "String 2" to A2.

Thanks abielita for tip.

Post a Comment for "Google Sheets Api V4 Appending Data Getting Bad Request 400 Error"