Zend Gdata Spreadsheet insertRow 抛出 HttpException

发布于 2025-01-07 02:23:45 字数 430 浏览 4 评论 0原文

我尝试使用 Zend_Gdata_Spreadsheets 和以下代码在工作表中插入一行:

$gdClient->insertRow(array('a'=>'gggggg','b'=>'hhhhh'), $currKey, $currWkshtId);

$currKey$currWkshtId 都是正确的,但它返回这个错误:

致命错误:未捕获异常“Zend_Gdata_App_HttpException” 消息“预期响应代码 200,收到 400。我们很抱歉,服务器 发生错误。请稍等一下,然后尝试重新加载您的电子表格。”

有谁知道这个错误的原因是什么以及我该如何解决它?

I am trying to insert a row in a worksheet using Zend_Gdata_Spreadsheets with the following code:

$gdClient->insertRow(array('a'=>'gggggg','b'=>'hhhhh'), $currKey, $currWkshtId);

Both $currKey and $currWkshtId are correct, but it returns this error:

Fatal error: Uncaught exception 'Zend_Gdata_App_HttpException' with
message 'Expected response code 200, got 400. We're sorry, a server
error occurred. Please wait a bit and try reloading your spreadsheet.'

Does anyone know what the cause of this error is and how I can solve it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

漫雪独思 2025-01-14 02:23:45

这是因为我需要将标题名称放入工作表列中。

有人知道他们默认有名字吗?或者是否可以以另一种方式引用该列?

This is because I need to put header name in a worksheet columns.

Anyone know if they have any name by default? or is possible referenciate the column in another way?

简单气质女生网名 2025-01-14 02:23:45

Google 假定电子表格中的第一行是标题行,因此第一行中的文本将成为该列的标题名称。在 Objective-C 中,引用列名时还必须删除空格并将字符串转换为小写,因此对于 php 来说也可能如此。尝试将 $currKey 转换为小写并在发送之前删除空格。

Google assumes that the first row in the spreadsheet is the header row, so the text in the first row becomes the header name for the column. In objective-c you must also remove spaces and convert the string to lower-case when referencing the column name, so that's probably true for php too. Try converting $currKey to lower case and removing spaces before sending it in.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文