我可以使用下面的代码通过Sheets API为已经存在的Google电子表格添加新工作表。如何从CSV导入此新工作表?
//Auth code to sheets API above this line
SheetsService sheetsService = new SheetsService(bc_init);
string spreadsheetID = "XXXXXX";
string sheetName = DateTime.Now.ToString();
var addSheetRequest = new AddSheetRequest();
addSheetRequest.Properties = new SheetProperties();
addSheetRequest.Properties.Title = sheetName;
BatchUpdateSpreadsheetRequest batchUpdateSpreadsheetRequest = new BatchUpdateSpreadsheetRequest();
batchUpdateSpreadsheetRequest.Requests = new List<Request>();
batchUpdateSpreadsheetRequest.Requests.Add(new Request
{
AddSheet = addSheetRequest
});
var batchUpdateRequest = sheetsService.Spreadsheets.BatchUpdate(batchUpdateSpreadsheetRequest, spreadsheetID);
batchUpdateRequest.Execute();