我想按在表中输入数据的时间顺序查询多张表的数据。
答案 0 :(得分:0)
=QUERY(
{IMPORTRANGE("1vIMYCHnj-jS_bIzfenLWcBTLdLiIJJ576p-0nk9tvto", "Sheet1!A1:C");
IMPORTRANGE("1UEaMB75MASF5vuIjWcsRN7UjZrbg2la74Y6MbW1jBbA", "Sheet1!A2:C")},
"where Col1 is not null order by Col3", 1)
对于时间戳,您需要以下脚本:
function onEdit(e) {
var s = SpreadsheetApp.getActiveSheet();
{
var r = s.getActiveCell();
if( r.getColumn() == 2 ) {
var nextCell = r.offset(0, 1);
var newDate = Utilities.formatDate(new Date(),
"GMT+1", "dd/MM/yyyy hh:mm:ss");
nextCell.setValue(newDate);
}
}