使用Power Automate更新Excel行失败:BadRequest错误求助
问题:Power Automate更新Excel表格失败(JSON解析错误)
我正尝试通过映射SharePoint List中的数据更新Excel表格,数据拉取正常但更新操作仍失败。
Power Automate输入参数
{ "host": { "connectionReferenceName": "shared_excelonlinebusiness", "operationId": "PatchItem" }, "parameters": { "source": "groups/9c178d5e-af1f-4a58-abe1-c9bbb8b82a21", "drive": "b!IYB5sGeARka0pqmmsZFjNYxCav5wmjhLrBJi2_jk_0XWhwFV-v4bQos_AMJjEalP", "file": "Shared Documents/General/MySite Files/HereWeGOAgain.xlsx", "table": { "@odata.id": "/drives('b%21IYB5sGeARka0pqmmsZFjNYxCav5wmjhLrBJi2_jk_0XWhwFV-v4bQos_AMJjEalP')/items('01DCW6CZMWNMDFIAAUHRD2ATH6WSHBSERU')/workbook/tables(%27%7B4C1941E9-7DA2-40B3-BBB2-3A473BE7FA86%7D%27)", "style": "TableStyleMedium2", "name": "Table1", "showFilterButton": true, "id": "{4C1941E9-7DA2-40B3-BBB2-3A473BE7FA86}", "highlightLastColumn": false, "highlightFirstColumn": false, "legacyId": "1", "showBandedColumns": false, "showBandedRows": true, "showHeaders": true, "showTotals": false }, "idColumn": "Submitted by", "id": "Terricka Gregg", "item": { "Discipline": "Gas Ops", "Supervisor": "Wesley Summers", "Team-Shift": "Gas Team 2" } } }
返回错误信息
BadRequest. Http request failed: the content was not a valid JSON. Error while parsing JSON: 'After parsing a value an unexpected character was encountered: @. Path 'message', line 1, position 71.'
流程截图







解决建议
- 检查表头匹配:确认Excel表格中
Submitted by列的表头完全一致,包括大小写、空格,Power Automate对表头匹配敏感。 - 简化
table参数:当前输入的table包含大量冗余字段(如style、showFilterButton等),尝试只传入@odata.id或者直接选择表格名称,避免多余字段干扰JSON解析。 - 验证匹配值格式:确认
Terricka Gregg在Excel的Submitted by列中是完全匹配的文本,无额外空格或格式差异。 - 处理特殊列名:
Team-Shift列名包含连字符,尝试用['Team-Shift']格式在item中引用,示例:"item": { "Discipline": "Gas Ops", "Supervisor": "Wesley Summers", "['Team-Shift']": "Gas Team 2" } - 测试基础操作:先手动指定固定值执行Patch操作,排除SharePoint数据映射的问题,确认基础功能正常后再引入动态数据。
内容的提问来源于stack exchange,提问作者Al Mack
相关产品推荐
相关产品推荐

