getActiveCell always returns A1

2019-08-29 02:07发布

I'm using the new Google Sheets API and any every time I try to get the active cell, it just returns cell A1 in the first sheet, no matter what. Here's my code:

var s = SpreadsheetApp.getActiveSpreadsheet();
var ss = s.getActiveSheet();
var result = ss.getActiveCell().getValue();

Seems like a Google bug...

1条回答
老娘就宠你
2楼-- · 2019-08-29 02:24

This is currently working perfectly for me. If I highlight a cell in the active sheet and run your code, the value in the cell is logged for me.

查看更多
登录 后发表回答