Skip to content

Instantly share code, notes, and snippets.

View Max-Makhrov's full-sized avatar
🇺🇦

Max Makhrov Max-Makhrov

🇺🇦
View GitHub Profile
@Max-Makhrov
Max-Makhrov / 2DArraySample.js
Last active November 2, 2017 15:08
2d Array, how data stored in Goolge Sheets
[ ['Name', 'Sum'],
['Max', 500],
['Lu',  150] ]
<table id="statistics" class="table table-condensed table-striped"></table>
<link 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>
<script>
var mySpreadsheet = 'https://docs.google.com/spreadsheets/d/1i_eJ1XyQXATMCanAZl55z_WAs_Lj0rad-lUnK7jhxz8/edit#gid=0';
// Load an entire worksheet.
$('#statistics').sheetrock({
url: mySpreadsheet
<div id="myTest"></div>
@Max-Makhrov
Max-Makhrov / GooogleSheetsToWeb.js
Last active June 10, 2016 14:09
trying to export Json data from Google Sheets
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script>
$(document).ready(function() {
getSheetData();
});
function getSheetData() {
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();