This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // http://stackoverflow.com/questions/11273268/script-import-local-csv-in-google-spreadsheet | |
| function onOpen() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var csvMenuEntries = [{name: "Upload CSV file", functionName: "doGet"}]; | |
| ss.addMenu("CSV", csvMenuEntries); | |
| } | |
| function doGet(e) { | |
| var app = UiApp.createApplication().setTitle("Upload CSV to Sheet"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function myFunction() { | |
| var ss = SpreadsheetApp.getActive(); | |
| var sheet = ss.getSheetByName("orange"); | |
| var range = sheet.getRange("1:1").getValues(); | |
| var titles = range[0]; | |
| var a1range = "A1:A"; | |
| var a1array = []; | |
| a1range = a1range +titles.length*titles.length; | |
| var b1range = "B1:B"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pymongo import Connection | |
| from bson import ObjectId | |
| from itertools import imap | |
| class Model(dict): | |
| """ | |
| A simple model that wraps mongodb document | |
| """ | |
| __getattr__ = dict.get |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getId() { | |
| /** | |
| * Imported from https://github.com/kyo-ago/UUID | |
| * Robbie Mitchell, @superstrong | |
| */ | |
| /** | |
| * UUID.core.js: The minimal subset of the RFC-compliant UUID generator UUID.js. | |
| * | |
| * @fileOverview |
OlderNewer