Comments (8)
+1 !
from node-edit-google-spreadsheet.
+1 I need this so badly :D
from node-edit-google-spreadsheet.
+1
from node-edit-google-spreadsheet.
Hello!
I'm mostly interested in autocreation of worksheet e.g.:
gs.load({
...
worksheetName: "MySheet"
...
should silently create MySheet instead of throwing error: "worksheet 'MySheet' not found". It could be configured like that:
gs.load({
...
autoCreateWorkSheets:true,
worksheetName: "MySheet"
...
The simplest thing that would work seems to be just calling G API with:
POST https://spreadsheets.google.com/feeds/worksheets/key/private/full
Content-Type: application/atom+xml
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:gs="http://schemas.google.com/spreadsheets/2006">
<title>Expenses</title>
<gs:rowCount>1000</gs:rowCount>
<gs:colCount>20</gs:colCount>
</entry>
https://developers.google.com/google-apps/spreadsheets/#adding_a_worksheet
It would be awesome if you could add this feature to the library, but if you are too busy could you share some hints on how to avoid headaches associated with G API and where to insert this call in the code?
Thanks :)
Adrian
from node-edit-google-spreadsheet.
@adriank I'd opt for the passing a create
boolean option. You're right about me being busy :( Haven't used this library in about 2 years and haven't written any Node for about 1 year. Happy to help you get started with this though. In terms of hints, there's not much to add to the notes above. Did you have questions in particular?
from node-edit-google-spreadsheet.
@jpillora I also have trouble finding time to code anything recently. Will see if I find someone to add this feature.
BTW. Do you recommend using the library since it's 2 years old? Or is it better to use something else that is supported? Do you know any other library that deals with Google Apps? I'm interested in integrating many Google's APIs and the best solution would be one library that covers all of Google products:).
from node-edit-google-spreadsheet.
@adriank 3,109 downloads in the last month
and only 1 reported bug which hardly anyone encounters. This library uses Google Sheets API version 3.0 so as long as that is supported by Google - this library should be fine to use.
from node-edit-google-spreadsheet.
Hey guys, I got started on adding a new worksheet feature.
I'm encountering an error from google... POST method does not support concurrency
i then found this mailing list post... and the guys solution was to remove the If-Match: *
on the headers. This unfortunately doesn't work and just results in If-Match or If-None-Match header or entry etag attribute required
, I think this worked with protocol version 1. If I changed the protocol version, then the .load
method fails to find the spreadsheet so i kinda gave up on that approach.
Any ideas?
Spreadsheet.prototype.addWorksheet = function(worksheetTitle, callback) {
var url = 'https://spreadsheets.google.com/feeds/worksheets/' + this.spreadsheetId + '/private/full';
var payload = '<entry xmlns="http://www.w3.org/2005/Atom" xmlns:gs="http://schemas.google.com/spreadsheets/2006">'
+ '<title>' + worksheetTitle + '</title>'
+ '<gs:rowCount>50</gs:rowCount>'
+ '<gs:colCount>10</gs:colCount>'
+ '</entry>';
var opts = {
url: url,
body: payload,
method: "POST"
}
this.request(opts, function(err, result) {
if(err) { callback(err); }
else {
console.log(result);
}
});
}
from node-edit-google-spreadsheet.
Related Issues (20)
- SyntaxError: Unexpected end of JSON input
- Getting "Error Reading Spreadsheet" error while reading a spreadsheet. HOT 6
- Unexpected Token HOT 2
- Append Row HOT 1
- Did Google Change the Scopes?
- How to get value from cells that use vlookups or formulas HOT 1
- Newlines get lost when saving cells HOT 1
- getValues option not getting passed correctly to util.gcell2cell (spreadsheet.js: 510)
- API hangs forever when retrieving a sheet.
- Creating a new spreadsheet ? HOT 1
- Add method, columns and rows from variable. HOT 13
- Segmentation fault with Node 4.0.0 HOT 2
- Which version of Node works? Keep getting "Error: toString failed" HOT 4
- OAuth Help HOT 2
- How to read document title?
- Google OAuth Error: Error: failed to obtain an authentication token, request failed with HTTP code 401: invalid_client HOT 2
- While reading row of spreadsheet i am getting formulae instead of value HOT 1
- Add row not working correctly if variable used to specify row
- error send data
- Only login
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-edit-google-spreadsheet.