Google Sheets API 4:如何追加到行尾 [英] Google sheets API 4: How to append to the end of the row

查看:34
本文介绍了Google Sheets API 4:如何追加到行尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

能够通过提供范围更新行,代码如下:

$range = "A1:B1";
$valueRange= new Google_Service_Sheets_ValueRange();
$valueRange->setValues(["values" => ["a", "b"]]); 
$conf = ["valueInputOption" => "RAW"];
$service->spreadsheets_values->update($spreadsheetId, $range, $valueRange, $conf);

考虑到我不知道范围,如何将行插入到工作表的末尾。

推荐答案

您是否在寻找spreadsheets.values.append?示例用法指南为here

append的参考文档描述为:Appends values to a spreadsheet. The input range is used to search for existing data and find a "table" within that range. Values will be appended to the next row of the table, starting with the first column of the table. See the guide and sample code for specific details of how tables are detected and data is appended.

如果这不是您要找的,您能更具体地回答您的问题吗?

这篇关于Google Sheets API 4:如何追加到行尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆