diff --git a/docs/classes/google-spreadsheet-worksheet.md b/docs/classes/google-spreadsheet-worksheet.md index 7904026..80cb862 100644 --- a/docs/classes/google-spreadsheet-worksheet.md +++ b/docs/classes/google-spreadsheet-worksheet.md @@ -248,6 +248,7 @@ Param|Type|Required|Description `coordinate`|[[GridCoordinate](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/other#GridCoordinate)]|✅|The coordinate at which the data should start being inserted, sheetId not required! `data`|String|✅|The data to insert. `delimiter`|String|✅|The delimiter in the data. +`type`|String (enum)
[PasteType](https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#PasteType)|-|How the data should be pasted. _defaults to `PASTE_NORMAL`_ #### `appendDimension(dimension, length)` (async) :id=fn-appendDimension > Appends rows or columns to the end of a sheet. diff --git a/lib/GoogleSpreadsheetWorksheet.js b/lib/GoogleSpreadsheetWorksheet.js index 9936d16..bbd30d8 100644 --- a/lib/GoogleSpreadsheetWorksheet.js +++ b/lib/GoogleSpreadsheetWorksheet.js @@ -697,7 +697,7 @@ class GoogleSpreadsheetWorksheet { // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#UpdateEmbeddedObjectPositionRequest } - async pasteData(coordinate, data, delimiter) { + async pasteData(coordinate, data, delimiter, type = "PASTE_NORMAL") { // Request type = `pasteData` // https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets/request#PasteDataRequest await this._makeSingleUpdateRequest("pasteData", { @@ -708,6 +708,7 @@ class GoogleSpreadsheetWorksheet { }, data, delimiter, + type }); }