google-apps-script - Google 表格脚本 getCurrentCell()
问题描述
我是 Google Scripts 的新手,需要帮助找到以下代码的解决方案:
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// Returns the current highlighted cell in the one of the active ranges.
var currentCell = sheet.getCurrentCell();
当我保存它时,它不允许我运行脚本。有什么我想念的吗?
解决方案
用这个 -
function getCurrentCellValue() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var currentCell = sheet.getCurrentCell();
// do what you need to do
}
推荐阅读
- python - How to remove border of TTK Notebook?
- reactjs - React Native Tab 背景变化
- javascript - 如何使用 JavaScript 和 PHP 将画布图像保存到服务器?
- python - Is there a way to iterate over a specific object's attribute of in a for loop?
- python - How increase speed of a code with map() function in Python
- python - 两个不同的 docker 容器 api 如何相互通信请求?
- matlab - 找到两个直方图的总和并绘制它
- php - 无法使用 md5 密码登录 codeigniter?
- ruby - Selenium Firefox Geckodriver 的下载目录错误
- flutter - Flutter navState 上下文