Spread Sheet Basic Operations with Google API and Ruby
In our last blog, we have seen how to implement authorization for google APIs with Google auth.
So now you know how to achieve authorization for using several Google APIs.
Today we will see how to use Google Drive API for basic operations on Google spreadsheet.
Here we go…
Step-1: Implement authorization by following of our reference blog,
Step-2: Now we need to enable the API to our project which we wish to use. This can be done from https://console.cloud.google.com/apis/library here.
a. Search the desired API in the list and click on it and enable it.
Now, As we are done with the authorization process, we can start operations on Google Spreadsheet.
Step-3: Performing Operations on Google Spreadsheet.
Here I will be explaining how to create Google Spreadsheet, How to read a Google Spreadsheet and how to share Google Spreadsheet with the help of Google Drive API and Ruby.
1. Creating Google Spreadsheet.
For Creating spreadsheet with Google Drive API First we need to do authorization first which we can achieve with Step-1.
Now we have our credential hash, Let’s write some ruby code to create Google Spreadsheet.
and done, our Google Spreadsheet is created!
2. Reading Google Spreadsheet.
That’s it, Pretty simple no..!!
3. Sharing Google Spreadsheet.
This is how we can share a spreadsheet with Google Drive API and ruby.
Give it a try and Enjoy Coding..!!
At BoTree Technologies, we build enterprise applications with our RoR team of 25+ engineers.
Consulting is free – let us help you grow!
Choose Your Language
Subscribe to Our Newsletter
- Digital Marketing
- IT Consulting
- Project Management