diff --git a/lib/GoogleSpreadsheetWorksheet.js b/lib/GoogleSpreadsheetWorksheet.js index 9e277d6..d8e85c5 100644 --- a/lib/GoogleSpreadsheetWorksheet.js +++ b/lib/GoogleSpreadsheetWorksheet.js @@ -369,7 +369,7 @@ class GoogleSpreadsheetWorksheet { const response = await this._spreadsheet.axios.request({ method: 'post', - url: `/values/${this.encodedA1SheetName}:append`, + url: `/values/${this.encodedA1SheetName}!A1:append`, params: { valueInputOption: options.raw ? 'RAW' : 'USER_ENTERED', insertDataOption: options.insert ? 'INSERT_ROWS' : 'OVERWRITE', diff --git a/test/rows.test.js b/test/rows.test.js index 360673a..cf54876 100644 --- a/test/rows.test.js +++ b/test/rows.test.js @@ -10,7 +10,8 @@ let sheet; let rows; let row; -const HEADERS = ['numbers', 'letters', 'col1', 'col2', 'col3']; +// having some issues caused by blank headers, so we add one here +const HEADERS = ['numbers', 'letters', '', 'col1', 'col2', 'col3']; const INITIAL_ROW_COUNT = 15; const INITIAL_DATA = [ ['0', 'A'],