Use this Widget to access a Google Spreadsheet and print the Document in your own style on Dashboard.
Using this widget to access Google spreadsheets requires you install the following gems separately. Add this lines to your application's Gemfile:
gem install google_drive
gem install google-spreadsheet-ruby
And then execute:
bundle
Add all project files in the same folders of your project and customize your project.erb
To use the widget you have to create some Token on Google and generate an refresh Token.
- Go to the Google Developers Console.
- Select a project, or create a new one.
- In the sidebar on the left, expand APIs & auth. Next, click APIs. Select the Enabled APIs link in the API section to see a list of all your enabled APIs. Make sure that the API is on the list of enabled APIs. If you have not enabled it, select the API from the list of APIs, then select the Enable API button for the API.
- In the sidebar on the left, select Credentials.
- Click Create new Key and create and use a server key if your application runs on a server.
vi get_access_token.rb
- Set YOUR_CLIENT_ID and YOUR_CLIENT_SECRET which you have generate on Google Developers Console
ruby get_access_token.rb
and follow the stepsvi jobs/spread.rb
- Set YOUR_CLIENT_ID, YOUR_CLIENT_SECRET and YOUR_REFRESH_TOKEN
- The DOCUMENT_ID is the bold part of the fileURL docs.google.com/spreadsheets/d/1zlycWSOb4WhChhku7t8hiT6nzHzj_hv8kOS3X2PyIUc/edit#gid=0
- Save the file and start dashing
dashing start