Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

edit-google-spreadsheet

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edit-google-spreadsheet - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

2

index.js

@@ -56,3 +56,3 @@

Spreadsheet.prototype.baseUrl = function() {
return 'https://spreadsheets.google.com/feeds/cells/' + this.spreadsheetId + '/' + this.worksheetId + '/private/full';
return 'http://spreadsheets.google.com/feeds/cells/' + this.spreadsheetId + '/' + this.worksheetId + '/private/full';
};

@@ -59,0 +59,0 @@

{
"name": "edit-google-spreadsheet",
"version": "0.0.2",
"version": "0.0.3",
"dependencies": [

@@ -5,0 +5,0 @@ "colors",

## Node - Edit Google Spreadsheet
#### Usage
Currently, there are about 3 different node modules which allow you to read data off Google Spreadsheets, though none with a good write API. Enter `edit-google-spreadsheet`. A simple API for editting Google Spreadsheets.
#### Install
```
npm install edit-google-spreadsheet
```
#### Basic Usage
Create sheet:
``` js
var Spreadsheet = require('edit-google-spreadsheet');
var Spreadsheet = require('edit-google-spreadsheet');
Spreadsheet.create({
//auth
username: '...',
password: '...',
spreadsheetId: '...',
//summary tab
worksheetId: '...',
callback: function(err, spreadsheet) {
if(err) throw err;
sheetReady(spreadsheet);
}
});
```
Spreadsheet.create(
...
);
Update sheet:
``` js
function sheetReady(spreadsheet) {
spreadsheet.add({ 3: { 5: "hello!" } });
spreadsheet.send(function(err) {
if(err) throw err;
console.log("Updated Cell at row 3, column 5 to "hello!");
});
}
```
#### More Examples
Batch edit:
``` js
spreadsheet.add([[1,2,3],
[4,5,6]]);
```
#### Features
Batch edit starting from row 5:
* Hello World
``` js
spreadsheet.add({
5: [[1,2,3],
[4,5,6]]
});
```
Batch edit starting from row 5, column 7:
``` js
spreadsheet.add({
5: {
7: [[1,2,3],
[4,5,6]]
}
});
```
Named cell references:
``` js
spreadsheet.add({
3: {
4: { name: "a", val: 42 },
5: { name: "b", val: 21 },
6: "={{ a }}+{{ b }}" //forumla with =D3+D5
}
});
```
*Note: cell `a` and `b` are looked up on `send()`*
#### API
#####spreadsheet.`add( obj | array )`
Add cells to the batch. See examples.
#####spreadsheet.`send( callback )`
Sends off the batch of `add`ed cells. Clears all cells once complete. Callback has signature: `funciton(err, result) {}`.
#### Todo
* Test
* OAuth
* Create New Spreadsheets
* Read Spreadsheet data
* List Spreadsheets on account
* List Worksheets on spreadsheet
#### Credits
Thanks to `googleclientlogin` for easy Google API ClientLogin Tokens
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc