首页 > 解决方案 > What is the Google App Script to move to the first empty row?

问题描述

I have reviewed previously asked questions on this but still can't work out the code. I have a sheet with a significant number of rows of data in it. Rather than scroll down to the first empty row, I have created a button and on click of that button, I want the cursor to take me to column A of the first empty row. This is my script at this point but I keep getting errors:

enter image description here

Can someone please help me.

标签: google-apps-scriptgoogle-sheets

解决方案


尝试这个:

function getLastRow() {
  var sss = SpreadsheetApp.getActiveSheet();
  sheet.getRange(sss.getLastRow()+1,1).activate();
}

推荐阅读