【问题标题】:Why doesn’t the form not POST in Excel 2016 for Mac?为什么表格在 Excel 2016 for Mac 中不能 POST?
【发布时间】:2017-11-16 00:18:07
【问题描述】:

我们正在测试一个用于 Excel 的加载项,该加载项的表单已发布到 https://httpbin.org/anything。该表单不会在 Excel 2016 版本 15.39 (171010) for Mac(High Sierra 版本 10.13.1)中发布。以下是 HTML 表单的基本要素:

<script type="text/javascript">

  //submit form
  $("#testForm").submit();

</script>

</head>
<body>

  <form method="POST" id="testForm" action="https://httpbin.org/anything" accept-charset="UTF-8" target="_blank">

    <div>
      <input type='hidden' name='mergeDataFormat' value='csv'>
    </div>
    <div>
      <input type="hidden" name="mergeData" id="mergeData" value='Name,Street,"City, State",ZIP Code'>
    </div>

    <input type="submit" value="Send" id="submitForm" />

  </form>

AppDomain 已在 Manifest 中设置:

<AppDomains>
   <AppDomain>https://httpbin.org/</AppDomain>
   ...
</AppDomains>

这是我们在 Charles HTTP 监视器版本 4.2 中看到的:

GET /anything HTTP/1.1
Host httpbin.org
Connection keep-alive
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
Upgrade-Insecure-Reque
sts 1
Accept text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding gzip, deflate, br
Accept-Language en-US,en;q=0.9
Cookie _gauges_unique_day=1; _gauges_unique_month=1; _gauges_unique_year=1; _gauges_unique=1
HTTP/1.1 200 OK
Server: meinheld/0.6.1
Date: Wed, 15 Nov 2017 18:07:11 GMT
Content-Type: application/json
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
X-Powered-By: Flask
X-Processed-Time: 0.00142621994019
Content-Length: 726
Via: 1.1 vegur
Connection: Keep-alive
{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9",
"Connection": "close",
"Cookie": "_gauges_unique_day=1; _gauges_unique_month=1; _gauges_unique_year=1; _gauges_unique=1",
"Host": "httpbin.org",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36"
},
"json": null,
"method": "GET",
"origin": "<ip-address-here>",
"url": "https://httpbin.org/anything"
}

按下发送按钮后,httpbin.org 页面会弹出,显示如下:

{
"args": {},
"data": "",
"files": {},
"form": {},
"headers": {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9",
"Connection": "close",
"Cookie": "_gauges_unique_day=1; _gauges_unique_month=1; _gauges_unique_year=1; _gauges_unique=1",
"Host": "httpbin.org",
"Upgrade-Insecure-Requests": "1",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36"
},
"json": null,
"method": "GET",
"origin": "<ip-address-here>",
"url": "https://httpbin.org/anything"
}

似乎没有 POST 到 URL。 Excel 中没有出现错误。可以在 Mac 上的浏览​​器中将表单成功发布到相同的 URL。此问题仅在 Excel 2016 for Mac 中出现。相同的代码在 Excel 2016 for Windows(7 和 10)和 Excel 在线版中运行良好。非常感谢任何有助于解决此问题的见解。

查看相关问题Is the Excel add-in incompatible with Excel 2016 for Mac when using POST method for forms?

【问题讨论】:

  • 我们正在调查此问题并尽快回复
  • Tristan 告知我们有一种解决方法。你能在这里分享吗?谢谢。

标签: macos post add-in office-addins excel-2016


【解决方案1】:

将 Mac 上的 Excel 2016 更新到版本 16.9.0 (18011602)。我们可以从 Excel 2016 for Mac 发布!感谢整个 MS 团队。

【讨论】:

    【解决方案2】:

    请参考post 了解最新信息。似乎是一个重复的问题。

    【讨论】:

    • Tristan 于 2017 年 12 月 14 日通知我们:人们正在另一个线程上与您联系,并发现了一个产品错误(以及潜在的解决方法。您能否向我们提供该解决方法?
    • 对不起,我对另一篇文章的回复直到现在才回复。你能在那里检查一下吗?
    猜你喜欢
    • 2018-11-01
    • 2015-11-10
    • 1970-01-01
    • 1970-01-01
    • 2018-03-28
    • 1970-01-01
    • 2017-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多