Tag: google sheets

更新Google Spreadsheets中的单元格会返回错误“缺少资源版本ID”/“远程服务器返回错误:(400)错误请求。”

我想更新Google Spreadsheets中的单元格值但不幸的是收到错误: Google.GData.Client.GDataRequestException was unhandled HResult=-2146233088 Message=Execution of request failed: https://spreadsheets.google.com/feeds/cells/1nW8nxoS2l9pbj6dctreEfKHNXmsfbbsCAvOd7TIj4Bo/od6/private/full/R1C1 Source=Google.GData.Client ResponseString=Missing resource version ID StackTrace: at Google.GData.Client.GDataRequest.Execute() … at System.Threading.ThreadHelper.ThreadStart() InnerException: System.Net.WebException HResult=-2146233079 Message=The remote server returned an error: (400) Bad Request. Source=System StackTrace: at System.Net.HttpWebRequest.GetResponse() at Google.GData.Client.GDataRequest.Execute() 我的代码非常简单,基于从https://developers.google.com/google-apps/spreadsheets/?csw=1#changing_contents_of_a_cell下载的示例: SpreadsheetsService service = new SpreadsheetsService(“MySpreadsheetIntegration-v1”); // TODO: Authorize the service object for a specific […]

使用Google Data API使用C#访问Google Spreadsheets会因Mono而失败

我正在尝试使用GData API访问我的Google电子表格。 我按照以下示例进行了示例: var service = new SpreadsheetsService(“myTest”); service.setUserCredentials(username, password); var query = new SpreadsheetQuery(); var feed = service.Query(query); 这应返回包含电子表格列表的Feed。 然而,这失败了: Google.GData.Client.GDataRequestException:执行请求失败: http ://spreadsheets.google.com/feeds/spreadsheets/private/full —> System.Net.WebException:远程服务器返回错误:(404)未找到。 当我在浏览器中直接尝试上述链接时,只要我已登录到我的Google帐户,我就可以下载该Feed。 更多信息: 我不在防火墙后面 我已多次检查我的用户名(maurits.rijk在gmail.com)和密码 我在MacBook上使用VirtualBox中的Mandriva 我的所有代码都是用Mono编译的 我在OS-X上尝试了相同的Javafunction。 该代码按预期运行。

使用C#和Sheets API v4更新Cell

有没有人有一个很好的C#示例用于使用v4 API更新单元格? 我在使用Google表格API v4的开发者网站上获得了获取单元格值c#示例。 我试图修改示例以更新值为“Tom”的单元格。 我坚持使用SpreadSheets.Values.Update的设置。 using Google.Apis.Auth.OAuth2; using Google.Apis.Sheets.v4; using Google.Apis.Sheets.v4.Data; using Google.Apis.Services; using Google.Apis.Util.Store; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace GoogleSheetsAPI4_v1console { class Program { // If modifying these scopes, delete your previously saved credentials // at ~/.credentials/sheets.googleapis.com-dotnet-quickstart.json static string[] Scopes = { SheetsService.Scope.Spreadsheet […]

如何从xamarin.forms中的Google电子表格中读取数据

我正在寻找一种直接从Google Sheets读取/写入数据的方法。 有没有人知道如何在Xamarin.Forms中做到这一点 ? 请记住,使用Install-Package Google.Apis.Sheets.v4 Package,从Windows Form访问Google sheets表格。 我使用以下链接: https://developers.google.com/sheets/api/quickstart/dotnet