首页 > 解决方案 > 使用 C# 访问 Google 电子表格(无 API)

问题描述

是否可以像 Arduíno 那样开发 C# 代码?

Arduíno 与谷歌脚本通信,谷歌脚本与谷歌电子表格通信。

阿杜伊诺代码:

const char* host = "script.google.com";
const int httpsPort = 443;
const char *GScriptId = "AKfycbwd9YkXXXXXXXXXXXXXXXXXXX";
String urlCal = String("/macros/s/") + GScriptId + "/exec?xxx";
String payload =  "{\"command\": \"appendRow\", \
                    \"sheet_name\": \"Sheet1\", \
                    \"values\": ";

client = new HTTPSRedirect(httpsPort);
client->setContentTypeHeader("application/json");
client->connect(host, httpsPort);
client->POST(urlCal, host, payload);

标签: c#google-apps-scriptgoogle-sheets

解决方案


推荐阅读