如何使用DriveSDK dotnet将csv数据上传到google spreadsheet-tab1

时间:2014-04-18 17:51:32

标签: google-drive-api google-api-dotnet-client google-drive-realtime-api

我正在尝试将csv数据上传到Google电子表格的特定标签。 我可以上传到现有的电子表格,但如果电子表格包含多个标签,那么它就会丢失。请帮忙。 以下是我的代码:

Google.Apis.Drive.v2.Data.File MyFile = SpreadsheetService.Files.Get("1AoXvmCCebGgTdE5XMEprtVxXRVprZExIRVhQTm96ZUE").Execute();//to get meta-data of existing google file
MyFile.MimeType = "text/CSV";
Google.Apis.Drive.v2.FilesResource.UpdateMediaUpload driveRequest = SpreadsheetService.Files.Update(MyFile, MyFile.Id, SourceStream, "text/CSV"); //metadata update         
driveRequest.NewRevision = true;
driveRequest.Convert = true;                    
driveRequest.Upload();  //content update

这会将csv数据上传并转换为Google电子表格格式,但我想将数据上传到(例如)电子表格的标签0。 谢谢!

0 个答案:

没有答案