Google spreadsheet API, 400 error bad request : unable to parse range

后端 未结 7 1115
孤街浪徒
孤街浪徒 2020-12-05 12:49

I am trying to access Google spreadsheets using a spreadsheet example. When I run the example code it worked fine. I just change the SpreadsheetId and range

相关标签:
7条回答
  • 2020-12-05 13:17

    If you look at the sheet itself you will notice that the Worksheet is titled "Class Data". So just put the name of your sheet where is says "Class Data". Example: String range = "SheetName!A1:C";

    0 讨论(0)
  • 2020-12-05 13:17

    String range = "Class Data!A2:A4";

    The Class Data is your worksheet's name, FYI: the name on the tab at the bottom, the default one is "Sheet1". Replace Class Data with the one you want to work with.

    0 讨论(0)
  • 2020-12-05 13:19

    Try replacing Class Data!A2:A4 with A2:A4

    0 讨论(0)
  • 2020-12-05 13:26

    I ran into this error when I had a typo in the name of the tab. In your case "Class Data" didn't match the name of the tab

    0 讨论(0)
  • 2020-12-05 13:30

    I was trying to add some data to a sheet named Emmett that did not existed yet and was receiving this error:

    Error: Unable to parse range: Emmet!A2:C12

    I had to manually create the sheet named Emmett in the spreadsheet and then it worked like a charm.

    0 讨论(0)
  • 2020-12-05 13:39

    In my case there was an extra space in the google sheet while I was trimming the sheet name at my end. Once I removed the trimming logic, everything worked fine.

    0 讨论(0)
提交回复
热议问题