Can't add data with addRow
See original GitHub issueI can access my spreadsheet correctly (using service account method), but wondering why i can’t add a new row. Would be thankful for some input:
my code:
var GoogleSpreadsheet = require('google-spreadsheet');
var async = require('async');
var doc = new GoogleSpreadsheet('1DfcW1M4D4qyJr7WZw13AACeXaE-wCyus6cnC1I5SSZM');
var sheet;
var newrow = {
    title: 'banana',
    type: 'fruit',
    url: 'http://example.com'
};
async.series([
  function setAuth(step) {
    var creds = require('./fruits.json');
    doc.useServiceAccountAuth(creds, step);
  },
  function getInfoAndWorksheets(step) {
    doc.getInfo(function(err, info) {
      console.log('Loaded doc: '+info.title+' by '+info.author.email);
      sheet = info.worksheets[0];
      console.log('sheet 1: '+sheet.title+' '+sheet.rowCount+'x'+sheet.colCount);
      step();
    });
  },
  function addStuff(step) {
    // Add data
    doc.addRow({
      worksheet_id: 1,
      new_row: newrow,
    }, function( err, rows ){
      step();
    });
  }
]);
output:
Loaded doc: fruits by hejurban@gmail.com
sheet 1: Sheet1 1000x26
Issue Analytics
- State:
- Created 7 years ago
- Comments:6
 Top Results From Across the Web
Top Results From Across the Web
DataTables cannot add row - Stack Overflow
I'm trying to add data to a table dynamically through JavaScript, and it returns this: Uncaught TypeError: Cannot read property 'add' of ...
Read more >Can't add DataRow to DataTable - MSDN - Microsoft
Hello,. I'm having trouble adding a DataRow to a DataTable. I create the DataRow like so: DataRow row = myDataTable.NewRow();. I add things ......
Read more >Solved: Cannot add row to one table - Google Cloud Community
Hi all, I'm having an issue with one system-generated “add” action. It's not adding a new row to my spreadsheet.
Read more >Unable to Add row in the middle of a data table - DataTables
I have a requirement to dynamically add a row at any given position to the data table . I learnt that there is...
Read more >Add rows to a data frame — add_row • tibble
This is a convenient way to add one or more rows of data to an existing data frame. See tribble() for an easy...
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

Yes, it did not help. but I found a solution first set header
but it still did not help, then I started looking for a problem in the module, and it was discovered that the array is not read correctly and made changes. fix and now everything works great
Did you find any resolution for this @urre?