vb.net - Sheets API v4 OVERWRITE and INSERTROWS in AppendRequest.InsertDataOptionEnum in VB .NET -
i using sheets api v4 in vb .net
following lines gives same result:
dim appendrequest spreadsheetsresource.valuesresource.appendrequest = service.spreadsheets.values.append(valuerange, updatespreadsheetid, updaterange)
appendrequest.insertdataoption = spreadsheetsresource.valuesresource.appendrequest.insertdataoptionenum.overwrite
appendrequest.insertdataoption = spreadsheetsresource.valuesresource.appendrequest.insertdataoptionenum.insertrows
in doumentation link, it's mentioned that:
"additionally, can choose if want overwrite existing data after table or insert new rows new data. default, input overwrites data after table. write new data new rows, specify insertdataoption=insert_rows in url."
instead of adding data last empty row of range, want insert new data @ first row of provided range.
the values.append api not support writing starting @ top of table, supports adding rows bottom of table (either overwriting data below table, or inserting rows write new data into).
(but, if want, can use spreadsheets.batchupdate api , manually construct requests insert new rows & add data.)
Comments
Post a Comment