Closed sushantwebmingo closed 5 years ago
I get the same error whenever I try to change the spreadsheetId in order to view my spreadsheet but not the the one that's already in quickstart.php.
Did you manage to display data from your own spreadsheet?
Hi @sushantwebmingo, what sample are you running? Are you sure that the Sheets quickstart was run without modifications?
I've formatted the issue. The error states the problem is with the range: Class Data!A1:B
See https://stackoverflow.com/questions/37893515/google-spreadsheet-api-400-error-bad-request-unable-to-parse-range
@Fatimamohammad08 It looks like you're using "test!A2:E"
. The error states it is unable to parse this. Can you try using a range like "A2:E2"
?
@grant hey thanks for the help ! I had a question . is that possible to pull out only one record from google sheet according to the user ID that's used for authentication? so that i don't need to pull over the complete spreadsheet and do an if statement?
@Fatimamohammad08 It is not possible to get just one row or cell. You can sort the sheet and get a range which is the top value, but you can't retrieve a cell by ID.
https://stackoverflow.com/questions/38114591/is-it-possible-to-access-row-id-of-a-google-spreadsheet
That question doesn't relate to this issue though and may be better for StackOverflow.
@grant Hello ! I wanted to know how can you fetch the data using a query? for example how would i get a row https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit from this if the student name is Alexandra?
I can get particular data of given name by spreadsheet api but not by ther query. We can not apply query here.
From: Fatimamohammad08 [mailto:notifications@github.com] Sent: Sunday, September 23, 2018 6:34 PM To: gsuitedevs/php-samples Cc: sushantwebmingo; Mention Subject: Re: [gsuitedevs/php-samples] quickstart.php for accessing data from spreadsheet of google (#15)
@grant https://github.com/grant Hello ! I wanted to know how can you fetch the data using a query? for example how would i get a row https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit from this if the student name is Alexander?
— You are receiving this because you were mentioned. Reply to this email directly, view https://github.com/gsuitedevs/php-samples/issues/15#issuecomment-423815107 it on GitHub, or mute https://github.com/notifications/unsubscribe-auth/AoAAPdP0GqDEZCkpa8-1M0dHafYXnscHks5ud4bDgaJpZM4VnuuJ the thread.Image removed by sender.
@grant @sushantwebmingo so if I have a column as ID as my unique Id . Can;t I query like in SQL ? Because if I use his link below https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/gviz/tq?tqx=out:html&tq=select+A,B,C,D,E+where+A=%27Alexandra%27 it does get the data. but i am unable to understand how to make it work using php.
You cannot use Sheets like a SQL database or query like a database. Maybe you could try this option: https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/batchGetByDataFilter
Please use the issue tracker for generic issues as GitHub is used for existing code samples. You can still discuss here if you wish, but I'll close this issue.
(Please search existing issues before creating a new one.)
Expected Behavior
want to show all data of sheet
Actual Behavior
want to show all data of sheet
Steps to Reproduce the Problem
Specifications
php -v
): 5.4