I have been working on an application where I need to write and update data to a spreadsheet using google spreadsheet api. I have followed the Android Quickstart provided by google Google Sheets API Android Quickstart and was able to retreive data from the google spreadsheet but I am not able to understand how to write data. Please help
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
After a lot of searching for a concrete example and not finding it, only here I was able to get something that worked for me, with the addition that I put for beginners like me. Thanks to @Veiga
I leave this concrete example, because other threads that I saw, throw compilation problems such as "
List<String>
is not acceptable asList<Object>
".But I thank those collaborators, example @k9yosh in the answer to How to assign a value to a ValueRange variable in java? , because they were also an inspiration for me to develop a concrete solution to this case.
If you followed the Quickstart tutorial correctly, then it you are few steps from learning how to write data.
In the code provided in the Quickstart tutorial, change the line
to:
This will grant access to write on a spreadsheet.
And instead of something like
you must create your own ValueRange instance, valueRange in this example, and then write:
Choose the ValueInputOption of your preference.
Please try going through Manage List-based and Cell-based Feeds to read and modify worksheets and data in Google Sheets.
However, since you're looking for the latest, as indicated in your post's title, and since version 4 of the Google Sheets API is now available, the following references will be very helpful too: