Sheetrock.js 1.0 Example 2

by Sergio Spagnuolo

HTML

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="https://chriszarate.github.io/sheetrock/dist/sheetrock.min.js"></script>
<h1>
Monitor de Tweets de Olavo de Carvalho
</h1>
<p>
Projeto para curso Volt
</p>



<table id="switch-hitters" class="table table-condensed table-striped"></table>

CSS

td {
  font-family:Inconsolata;
  color: red
}

JavaScript

// Sheetrock.js 1.0 Example 2
// https://chriszarate.github.io/sheetrock/

// Let’s look at switch hitters and rank them by batting average. 
// We’ll only grab the columns we care about and fetch just the 
// top ten to help focus the reader’s attention.

// Define spreadsheet URL.
var mySpreadsheet = 'https://docs.google.com/spreadsheets/d/1OI1loeCxHqXCoROPRKsB73akiYLEZHXkrc78sdudnG4/edit#gid=0';

// Load top ten switch hitters.
$('#switch-hitters').sheetrock({
  url: mySpreadsheet,
  query: "select A,B,C,D,E",
  fetchSize: 10
});