Zend Gdata Spreadsheet insertRow 抛出 HttpException
我尝试使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是因为我需要将标题名称放入工作表列中。
有人知道他们默认有名字吗?或者是否可以以另一种方式引用该列?
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?
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.