gpt4 book ai didi

excel - 如何在后端使用电子表格将数据从 EXCEL 用户表单发布到 Google 表单?

转载 作者:可可西里 更新时间:2023-11-01 17:14:18 26 4
gpt4 key购买 nike

我一直想解决一个问题,但到目前为止还没有人能帮助我。

我有一个 excel 文件,我将分发给同事。他们将打开它,并输入 5 个字段:-

名字,邮寄地址,手机号码,电子邮件地址,和应付金额。

完成后,他们将验证将显示在已填充用户表单中的值(即将从已填充的 Excel 单元格中选取值)。

我希望在点击提交按钮后,用户表单使用 POST 函数来填充我的 google 文档页面上可用的电子表格。

现在我知道这是可能的,因为人们一直在通过 POST 函数访问 google 表单。看这里: http://asynclabs.com/forums/viewtopic.php?f=16&t=489

有人可以帮助我吗?

谢谢!

最佳答案

从 Excel VBA 执行 HTTP POST 的最佳方法可能是使用 MSXML

添加对“Microsoft XML,v3.0”的引用,使用如下示例 VBA 代码:

Dim httpRequest as XMLHTTP
Set httpRequest = New XMLHTTP

' ... False means execute request synchronously
httpRequest.Open "POST", "https://spreadsheets.google.com/...", False
httpRequest.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
httpRequest.send "entry.0.single=<DATA1>&..."

' ... after the .send call finishes, you can check the server's response:
httpRequest.status
httpRequest.statusText
httpRequest.responseText
httpRequest.responseXML

MSDN documentation

关于excel - 如何在后端使用电子表格将数据从 EXCEL 用户表单发布到 Google 表单?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6828974/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com